/* --- Global Styles & Theme Variables --- */
:root {
    --brand-dark-charcoal: #1a1a1a;
    --brand-hazard-yellow: #FFD700;
    --brand-light-gray: #f8f9fa;
}

html {
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--brand-dark-charcoal);
    color: var(--brand-light-gray);
    /* THE SUBTLE BLUEPRINT GRID BACKGROUND */
    background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 2rem 2rem;
    min-height: 100%; /* Ensure body fills the viewport */
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6, .display-4 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- Home Page Specific Styles --- */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 20px;
}

    .hero-content .display-4 {
        font-size: clamp(2.5rem, 5vw, 4.5rem);
        text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    }

    .hero-content .lead {
        font-size: clamp(1rem, 2vw, 1.5rem);
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

.btn-brand {
    background-color: var(--brand-hazard-yellow);
    border-color: var(--brand-hazard-yellow);
    color: #1a1a1a;
    font-weight: 700;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

    .btn-brand:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        background-color: #ffeb3b;
        border-color: #ffeb3b;
        color: #1a1a1a;
    }

.core-loop-section {
    padding: 5rem 0;
}

.core-loop-icon {
    font-size: 4rem;
    color: var(--brand-hazard-yellow);
}

.featured-levels-section {
    padding: 3rem 0 5rem 0;
    background-color: #212121;
}

    .featured-levels-section .card {
        background-color: #2c2c2c;
        border: 1px solid #444;
        color: var(--brand-light-gray);
        transition: transform 0.2s;
    }

        .featured-levels-section .card:hover {
            transform: translateY(-5px);
        }

    .featured-levels-section .card-title a {
        color: var(--brand-light-gray);
        text-decoration: none;
    }

        .featured-levels-section .card-title a:hover {
            color: var(--brand-hazard-yellow);
        }

/* Falling Ragdoll Style */
.falling-ragdoll {
    position: fixed;
    width: 20px;
    height: 40px;
    background-color: var(--brand-hazard-yellow);
    opacity: 0.8;
    z-index: 9999;
    pointer-events: none;
    border-radius: 5px;
}

/* --- COMPONENT-SPECIFIC STYLES --- */

/* --- Tutorial Page --- */
.container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.container th, .container td {
    padding: 12px;
    border: 1px solid #444;
    text-align: left;
}

.container th {
    background-color: #e9ecef;
    color: #212529; /* Dark text for table headers */
    font-weight: 700;
}

.container pre {
    background: #e9ecef;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #212529; /* Dark text for preformatted blocks */
}

    .container pre code {
        background: transparent;
        color: inherit;
        padding: 0;
    }

.container .note {
    background-color: #fff3cd;
    border-left: 6px solid #ffeeba;
    padding: 15px;
    margin: 20px 0;
    color: #664d03; /* Dark text for note boxes */
}

/* --- Star Rating System (LevelDetail Page) --- */
.not-authorized-rating a {
    text-decoration: none;
}

/* This is the main container for the stars on THIS page */
.not-authorized-rating a {
    text-decoration: none;
}

/* This is the main container for the stars on THIS page */
.interactive-rating .rating-stars-wrapper {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

    .interactive-rating .rating-stars-wrapper input[type="radio"] {
        display: none;
    }

    .interactive-rating .rating-stars-wrapper label {
        font-size: 2.5rem;
        color: #ddd; /* Default empty star color */
        cursor: pointer;
        margin-right: 8px;
        transition: color 0.2s ease-in-out;
    }

    /* --- THIS IS THE CORRECTED LOGIC --- */

    /* 1. When an input is checked, color all sibling labels that come AFTER it in the HTML.
   Since the HTML is 5,4,3,2,1, checking #3 will color labels 3, 2, and 1. */
    .interactive-rating .rating-stars-wrapper input[type="radio"]:checked ~ label {
        color: #ffc107;
    }

    /* 2. When you hover over a specific label, color IT and all sibling labels that
   come AFTER it in the HTML. This correctly creates the fill-up effect from left to right. */
    .interactive-rating .rating-stars-wrapper label:hover,
    .interactive-rating .rating-stars-wrapper label:hover ~ label {
        color: #ffc107;
    }

.card-text {
    color: #212529;
}