/* --- BASE CARD STYLES --- */
.card {
    position: relative; /* Add this back */
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #2b2028;
    box-shadow: 7px 8px 0 #2b2028;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-sizing: border-box;
    overflow: hidden; /* Add this back */

    /* Subtle background gradient for depth */
    background-image: none;
}

/* --- YOUTUBE CARD (Base Component) --- */
.youtube-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid #2b2028;
    box-shadow: 7px 8px 0 #2b2028;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
}

/* For non-swiper panels */
.youtube-card:not(.swiper-slide .youtube-card) {
    padding: 55px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.youtube-card > a {
    text-decoration: none; /* Removes the default link underline */
}

.youtube-card h2 {
    position: absolute;
    top: 15px; 
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.6em;
    font-weight: 700;
    padding: 8px 18px;
    color: var(--title-pill-text);
    background-color: var(--title-pill-bg);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    cursor: pointer; /* This adds the hand icon on hover */
    transition: transform 0.2s ease;
}

.youtube-card > a:hover h2 {
    transform: translateX(-50%) scale(1.03); /* Adds a subtle grow effect */
}

.youtube-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.youtube-thumbnail-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-thumbnail-wrapper:hover .youtube-thumbnail-image {
    transform: scale(1.05);
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: #ff0000;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.twitch-play-button {
    background-color: #9146FF;
}

.youtube-thumbnail-wrapper:hover .twitch-play-button {
    background-color: #772ce8;
}

.youtube-thumbnail-wrapper:hover .youtube-play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-play-button::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #ffffff;
}

.youtube-video-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    pointer-events: none;
}

.youtube-channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.youtube-text-info {
    min-width: 0;
}

.youtube-video-title {
    font-size: 1em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.youtube-channel-name {
    font-size: 0.85em;
    color: #e0e0e0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin: 0;
    opacity: 0.9;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* --- PROFILE CARD (Base Component) --- */
.profile-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow-color), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.profile-avatar-wrapper {
    width: 250px;
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    border: 5px solid var(--border-color);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    transform: scale(1.02);
}

.profile-content {
    width: 100%;
    padding: 20px 30px 30px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-content h1 {
    margin: 0 0 5px 0;
    font-size: clamp(1.8em, 8vw, 2.8em);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    word-break: break-word;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 5px 0;
}

.social-links a {
    color: var(--nav-text-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.social-links a:hover {
    color: var(--nav-hover-bg);
    transform: scale(1.15) translateY(-2px);
}

.social-links img {
    width: 28px;
    height: 28px;
}

.profile-content .bio {
    font-size: 1.1em;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 10px;
    white-space: pre-wrap;
    line-height: 1.6em;
    opacity: 0.9;
}

.bio-editor {
    display: none;
    width: 100%;
    margin-top: 10px;
}

.bio-editor textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: 'Nunito', sans-serif;
    font-size: 1.1em;
    box-sizing: border-box;
    resize: vertical;
}

.bio-edit-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.admin-edit-button {
    display: none;
    background: none;
    border: 1px solid var(--nav-text-color);
    color: var(--nav-text-color);
    padding: 5px 10px;
    font-size: 0.8em;
    border-radius: 5px;
    cursor: pointer;
    margin-left: auto;
    margin-bottom: 0px;
}

.admin-edit-button:hover {
    background-color: var(--nav-text-color);
    color: var(--card-bg);
}

/* --- MISC ICONS --- */
.form-title-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 10px;
}

.capsule-icon {
    width: 36px;
    height: 36px;
    margin-right: 8px;
    vertical-align: middle;
    margin-top: -2px;
}
/* --- MISC ICONS --- */
/* --- NEW: Reusable Animated Border --- */
@keyframes border-chase {
    to {
        /* This now correctly animates the SECOND background (the gradient) while keeping the first static */
        background-position: 0 0, 200% center;
    }
}

.animated-border-panel {
    border-width: 3px;
    border-style: solid;
    border-color: transparent;

    background: 
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(90deg, var(--border-anim-color-1), var(--border-anim-color-2), var(--border-anim-color-1)) border-box;
    
    background-size: auto, 200% 100%;
    
    /* Set the initial position explicitly to ensure smooth animation start */
    background-position: 0 0, 0% center;
    
    animation: border-chase 3s linear infinite;
}
