/* Container adjustments */
.viewer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;   
}


/* --- Carousel --- */
.channel-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 15px 0;
    scrollbar-width: thin; /* Firefox */
}

.channel-card {
    min-width: 140px;
    background-color: #333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.channel-card:hover {
    transform: scale(1.05);
    background-color: #444;
    border-color: #007bff;
}

.channel-icon {
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    margin: 0 auto 10px;
    font-size: 30px;
    line-height: 60px;
    font-weight: bold;
}

/* --- Video Grid --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.video-card img {
    width: 100%;
    display: block;
    opacity: 0.8;
}

.video-title {
    padding: 10px;
    font-size: 0.9rem;
    color: #fff;
}

.video-modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: #000000; /* Solid Black for immersive feel */
}

/* Adjust content to fill screen better in fullscreen mode */
.video-modal-content {
    position: relative;
    width: 100%;       /* Full width */
    height: 100%;      /* Full height */
    margin: 0;         /* Remove margins */
    max-width: none;   /* Remove max-width constraint */
}

/* Ensure the iframe takes up the whole space */
#youtube-player {
    width: 100%;
    height: 100%;
    border: none;
}

/* Make the close button floating and visible on top of the video */
.close-video {
    position: absolute;
    top: 20px;
    right: 30px;
    color: rgba(255, 255, 255, 0.5); /* Semi-transparent */
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001; /* Above the video */
    transition: color 0.3s;
}

.close-video:hover {
    color: #ff0000; /* Red on hover */
}


/* --- Video Card Styling (Modification for Delete Mode) --- */
.video-card.delete-mode {
    border: 3px solid #dc3545; /* Red border for delete mode */
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.7);
}

.delete-x {
    display: none; /* Hidden by default */
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545; /* Red background */
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    z-index: 10; /* Above the thumbnail and title */
    transition: background-color 0.2s;
}

.video-card.delete-mode .delete-x {
    display: block; /* Show the X in delete mode */
}

.delete-x:hover {
    background-color: #c82333; /* Darker red on hover */
}

/* Ensure play icon is also positioned relative to the card */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 30px;
    opacity: 0.7;
}

/* Make sure the thumbnail isn't clickable when deleting */
.video-card.delete-mode:hover {
    transform: none; /* Disable card hover effect in delete mode */
    box-shadow: none;
}




/* --- Footer Compliance Styling --- */
.viewer-footer {
    padding: 40px 0;
    margin-top: 40px;
    display: flex;
    flex-direction: column; /* Stack logo and links vertically */
    justify-content: center;
    align-items: center;
    border-top: 1px solid #333;
}

.footer-content {
    text-align: center;
}

.footer-links {
    margin-top: 15px;
    font-size: 0.85rem;
}

.footer-links a {
    color: #a0a0a0; /* Subtle grey to match your dark theme */
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff; /* Brighten on hover */
    text-decoration: underline;
}

.footer-links .separator {
    margin: 0 10px;
    color: #444;
}

.yt-developed-logo {
    max-width: 200px; /* Ensures the logo stays a reasonable size */
    height: auto;
    display: block;
    margin: 0 auto;
}



/* Flashcard Game Styles */
.flashcard {
    width: 130px;
    height: 170px;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.flashcard:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
}

.correct-glow {
    border: 6px solid #28a745 !important;
    box-shadow: 0 0 20px #28a745 !important;
    background-color: #f0fff0 !important;
    transform: scale(1.1);
}


/* Animation for when towers match */
.match-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    filter: blur(20px);
    opacity: 0;
    animation: flash-white 0.5s ease-out;
    pointer-events: none;
}

@keyframes flash-white {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.5); }
}

/* Ensure the success banner is visible on top of everything */
#success-banner {
    z-index: 5000 !important;
}

/* Smoother transitions for the blocks themselves */
.game-block {
    will-change: transform;
}

