@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: #191919;
    color: #FFFDF0;
    text-align: center;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

ul {
    list-style-type: none;
}

h1 {
    color: #ffffff; /* White */
}
p {
    font-size: 1.2rem;
    color: #FFFDD0; /* Dark Charcoal */
}

iframe {
    width: 100%;
    /*max-width: 560px; !* Maintain upper limit *!*/
    height: auto;
    aspect-ratio: 16/9; /* Keeps the aspect ratio */
    margin: 0 auto; /* Center align the iframe */
    /*display: block; !* Ensures centering works *!*/
}
.highlight {
    color: #1a3e59; /* Green */
    font-weight: bold;
}
.footer {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #F7F5B9;
}
.emoji {
    font-size: 3rem;
    animation: bounce 1.5s infinite;
}
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}
.anomaly-section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    position: relative;
}

.advanced-message {
    text-align: center;
    color: #85d837; /* Matches the cube's glow */
    font-family: 'Courier New', Courier, monospace; /* Techy font */
    text-shadow: 0 0 10px #85d837, 0 0 20px #85d837;
    font-size: 14px;
    margin: 10px 0 0 0; /* Adjusts spacing to ensure proper alignment with the cube */
    white-space: nowrap; /* Prevents text from breaking into multiple lines */
}

.cube-with-message {
    display: block; /* Center-align as a block */
    text-align: center;    /* Ensures both cube and text are aligned */
    opacity: 1;
    animation: fadeAway 3s ease-out 3s forwards; /* Fades out after 3 seconds */
}

.cube-container {
    width: 50px;
    height: 50px;
    perspective: 400px;
    margin: 20px auto;
    animation: fadeAway 3s ease-out 3s forwards; /* Fades out after 3 seconds */
}
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spinCube 2s infinite linear;
}
.cube div {
    position: absolute;
    width: 100%;
    height: 100%;
    background: none; /* No background */
    border: 2px solid #85d837; /* Indigo blue borders */
    box-shadow: 0 0 10px #85d837, 0 0 20px #85d837, 0 0 30px #85d837;
}
.cube .front  { transform: translateZ(25px); }
.cube .back   { transform: rotateY(180deg) translateZ(25px); }
.cube .right  { transform: rotateY(90deg) translateZ(25px); }
.cube .left   { transform: rotateY(-90deg) translateZ(25px); }
.cube .top    { transform: rotateX(90deg) translateZ(25px); }
.cube .bottom { transform: rotateX(-90deg) translateZ(25px); }

@keyframes spinCube {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@media screen and (max-width: 768px) {
    .anomaly-section {
        font-size: 1.2rem; /* Adjust font size for smaller screens */
    }

    .cube-container {
        width: 40px; /* Scale down the cube */
        height: 40px;
    }

    .advanced-message {
        font-size: 12px; /* Adjust text size */
    }

    iframe {
        max-width: 90%; /* Reduce max width */
        margin: 10px 15px; /* Add space around the iframe */
    }
}

@media screen and (max-width: 480px) {
    .footer {
        font-size: 0.8rem; /* Make footer text smaller */
    }

    iframe {
        max-width: 85%; /* Further reduce for very small screens */
        height: 200px; /* Manually set a smaller height if aspect ratio isn't working */
    }
}

.result {
    display: none;
    color: #2e8b57;
    font-size: 1.2rem;
}
.result .tick {
    color: green;
    font-size: 1.5rem;
}

/* Flex container for YouTube videos */
.video-container {
    display: flex;
    justify-content: center;
    gap: 30px 40px; /* Add spacing between videos */
    flex-wrap: wrap; /* Ensure videos stack on smaller screens */
    padding: 30px 0; /* Add padding inside the container */
}

.video-container > .newly-added-section {
    width: 100%; /* fixed width */
    max-width: 400px;
    border-radius: 10px;
    flex: 1 1 45%; /* prevent stretching */
}

@media (max-width: 768px) {
    .video-container {
        margin-left: 2%; /* Reduced margin for smaller screens */
        margin-right: 2%; /* Reduced margin for smaller screens */
    }

    .video-container iframe {
        flex: 1 1 100%; /* On small screens, videos take full width */
        border-radius: 10px;
    }
}

@keyframes fadeAway {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.newly-added-tag {
    position: absolute; /* Tag positioned relative to its container */
    top: -15px; /* Adjust to place outside the video boundary */
    left: 15px; /* Align to the left outside the frame */
    background-color: red; /* Tag background color */
    color: white; /* Text color */
    font-size: 0.9rem; /* Slightly smaller text size */
    font-weight: bold;
    padding: 5px 10px; /* Padding for the tag */
    border-radius: 4px; /* Slightly rounded corners */
    z-index: 1; /* Ensures tag appears above everything */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Optional: Adds subtle shadow */
    text-align: center; /* Center-align text */
    white-space: nowrap; /* Prevent text wrapping */
}

.newly-added-section {
    position: relative; /* Required for absolute positioning of the tag */
    flex: 1 1 45%; /* Ensure consistency with other videos */
}

.video-frame {
    width: 100%; /* Full width for consistent appearance */
    aspect-ratio: 16 / 9;
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensures it doesn’t inline with text */
    border-radius: 10px;
}

.newly-added-section,
.video-container iframe {
    transition: transform 0.2s ease-in-out;
}
.newly-added-section:hover,
.video-frame:hover {
    transform: scale(1.03);
    z-index: 2;
}

.scrollable-video-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto; /* ✅ enables scrolling */
    padding: 10px 20px;
    margin-bottom: 30px;
    max-width: 100vw; /* ✅ restricts overflow */
}
.playlist-item {
    flex: 0 0 auto;
    width: 360px;
    color: white;
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

.playlist-item:hover {
    transform: scale(1.03);
}
.playlist-item iframe {
    width: 100%;
    height: 204px;
    border-radius: 8px;
}
.playlist-frame {
    width: 100%;
    height: 270px;
    border-radius: 8px;
}

.scrollable-video-strip::-webkit-scrollbar {
    height: 6px;
}
.scrollable-video-strip::-webkit-scrollbar-thumb {
    background-color: #fff0f0;
    border-radius: 10px;
}

.carousel-wrapper {
    max-width: 90%;
    margin: 0 auto; /* centers the carousel */
}

.scrollable-article-strip {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 10px 0 10px 20px; /* Only left padding, no right gap */
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px; /* Aligns first item nicely */
    flex: 1; /* Takes most of the width */
}

.article-card {
    flex: 0 0 auto;
    width: 300px;
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    color: black;
    text-align: left;
    scroll-snap-align: start;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s ease-in-out;
}

.article-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.article-card h4 {
    margin: 0 0 8px;
    color: #1a3e59;
}

.article-card p {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 12px;
}

.article-card a {
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
}

/* Language selection links */
.language-links a {
    text-decoration: none;
    padding: 6px 12px;
    color: #ffffff;
}

/* Optional: add hover style */
.language-links a:hover {
    text-decoration: underline;
    color: #e0f7fa;
}

.contact-icons {
    display: flex;
    justify-content: center; /* Center icons in the row */
    gap: 20px; /* Space between icons */
    margin-top: 16px;
    flex-wrap: wrap; /* Wrap on small screens if needed */
}

.contact-icons a {
    font-size: 1.8rem;
    color: #add8e6;
    transition: transform 0.2s ease-in-out, color 0.2s;
}

.contact-icons a:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.youtube-thumbnail {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.youtube-thumbnail iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.youtube-thumbnail:hover {
    transform: scale(1.03);
    z-index: 2;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    pointer-events: none; /* avoid blocking click */
}

.fade-in {
    opacity: 0;
    transform: translateY(20px); /* optional slight drop */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}