/* --- Base and Mobile-First Styles --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #232323;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container { width: 100%; max-width: 650px; text-align: center; }

h1 { margin-bottom: 1.5rem; font-size: 1.8rem; }
h2 { margin-bottom: 2rem; }

.hidden { display: none; }
.screen { animation: fadeIn 0.5s ease-in-out; }

/* --- NEW: Hyperlink Styles for Dark Theme --- */

/* Target links specifically inside the download content area */
a {
    /* A bright, modern blue that is highly readable on a dark background */
    color: #58a6ff; 
    
    text-decoration: underline;
    text-decoration-thickness: 2px;
    
    /* Make the link slightly bolder to stand out from regular text */
    font-weight: 600;
    
    /* Add a subtle transition for smooth color changes */
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

/* Style for links the user has already visited */
a:visited {
    /* A pleasant, muted purple is a standard and effective choice */
    color: #80bfff;
}

/* Style for when the link is being clicked */
a:active {
    /* Briefly change to an even brighter color for click feedback */
    color: #80bfff;
}

/* --- Choice Container --- */
.platform-options {
    display: flex;
     /* Default Mobile: Stack all buttons/cards vertically */
    flex-direction: column;
    gap: 20px;
    margin-bottom: 2rem;
    align-items: stretch; /* Default, but explicit */
}


/* --- Image Card Styles --- */
.choice-card {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: 100%;
     /* FIX: Ensure card fills 100% height of its parent (wrapper or flex container) */
    height: 100%; 
    padding: 0;
    overflow: hidden;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
     /* FIX: Card itself is a flex container */
    display: flex; 
    flex-direction: column; 
}

.choice-card:hover {
    transform: translateY(-5px);
}

.card-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #2c2c2c;
}

.choice-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    /* FIX: Allow this area to grow and fill available vertical space */
    flex-grow: 1; 
    /* FIX: Vertically & Horizontally center the span/text within the grown area */
     display: flex;
     align-items: center;
     justify-content: center;
}

/* --- Platform Icon Button Styles --- */
.platform-btn {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 25px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
     /* FIX: Ensure buttons fill width/flex correctly */
     flex: 1;
     width: 100%; /* Ensure width for column layout */
}
.platform-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}
.platform-icon { font-size: 4rem; margin-bottom: 15px; }

/* --- Final Blog/Download Content Styles --- */
.download-content {
    background-color: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}
.download-content h2 { margin-bottom: 1rem; }
.download-content p { line-height: 1.6; margin-bottom: 1rem; }

.back-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0.25rem auto 0 auto;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: #555;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.back-btn:hover { background-color: #666; }

.video-container {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: 8px;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Animated Rainbow Glow Effect --- */
.glow-wrapper {
    position: relative;
    /* FIX: Width for column, flex for row handled by media queries below */
    width: 100%; 
    transition: transform 0.2s ease;
}

.glow-wrapper:hover {
    transform: translateY(-5px);
}
 .glow-wrapper:hover .choice-card {
     transform: none; /* Card inside does not move, only wrapper moves */
 }

.glow-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px; 
    z-index: -1;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400%;
    border-radius: 15px;
    filter: blur(8px);
    animation: animateGlow 10s linear infinite;
}

.glow-wrapper .choice-card {
    background-color: #2c2c2c; /* Opaque background for readability */
}

 /* FIX: Prevent the card inside the wrapper from moving on its own when wrapper is hovered */
 .glow-wrapper .choice-card:hover {
    transform: none;
}


@keyframes animateGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* ======================================
   MEDIA QUERIES - Responsive Adjustments
   ====================================== */

/* FIX: For slightly larger phones/small tablets and up, make MOD cards side-by-side */
@media (min-width: 480px) {
     /* Make mod card container a row */
    #selection-container > .platform-options {
        flex-direction: row;
    }
    /* Make mod cards (glow-wrapper and choice-card) equal width/height */
     #selection-container > .platform-options > * {
        flex: 1;
        min-width: 0; /* Prevents flex items breaking layout */
     }
}

/* For Tablets and Desktops */
@media (min-width: 768px) {
    h1 { font-size: 2.5rem; }
    .download-content { padding: 40px; }

    /* Make ALL options (mod cards AND platform buttons) side-by-side */
    .platform-options {
         flex-direction: row;
    }
     /* Ensure Platform buttons also share space equally */
     .platform-options > * {
        flex: 1;
        min-width: 0;
     }
}

/* --- Big Green Download Button --- */
.download-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    margin: 1.5rem 0;
    background-color: #26b460;
    color: white;
    border: none;
    border-radius: 10px;
    text-decoration: none; /* Override the blue link color from above */
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}
.download-icon {
    font-size: 1.6rem;
    margin-right: 12px;
}
.download-btn:hover {
    filter: brightness(0.9);
    border-bottom-width: 6px;
    color: white; /* Ensure color doesn't change on hover */
    text-decoration: none; /* Ensure no underline appears on hover */
}

.button-container a:visited {
    color: white;
}