/* 1. FONTS & RESET */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&display=swap');
/* 1. GLOBAL & RESET */
body {
    font-family: 'Montserrat', sans-serif;
    
    background-color: #f4f4f4; /* Light grey outside the app */
    margin: 0;
    padding: 0;
    color: #000;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* 2. APP CONTAINER (Mobile Optimized) */
.game-container {
    max-width: 480px; /* Limits width like a mobile app */
    margin: 0 auto;   /* Centers it on desktop */
    background: #ffffff;
    min-height: 100vh;
    position: relative;
    padding: 0px ;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}


/* 3. SCREENS (Navigation Logic) */
.screen {
    display: none; /* Hidden by default */
    width: 100%;
    
}

.screen.active {
    display: block; /* Only active screen is shown */
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 4. HEADERS & LOGO */
.logo-area {
    text-align: center;
   
    margin-bottom: 0px;
}

.logo-area img {
    max-width: 100%;
    margin-bottom: 10px;
}
.logo img{max-width:180px}
.logo{margin:0px auto; text-align: center; padding-top:30px}
.content{margin-top:12rem}

h1{
    text-align: center;
    
    font-weight: 900; /* Thin, elegant look from PDF */
    text-transform: uppercase;
    letter-spacing: 0px;
    margin-top: 0;
    margin:0px 60px;
    font-size:20px;
}
h2 {
    text-align: left;
    
    font-weight: 900; /* Thin, elegant look from PDF */
    text-transform: uppercase;
    letter-spacing: 0px;
   
    margin: 30px;
    font-size:35px;
}

p {
    text-align: center;
    color: #000;
    line-height: 1.5;
    padding-top:30px;
    font-size:14px;
    margin:0px 85px;
}

/* 5. BUTTONS (Black Pill Shape) */
.btn-primary, 
a.btn-primary {
    display: block;
    width: 100%;
    padding: 18px;
    background-color: #10202f ;
    color: white;
    border: none;
    border-radius: 50px; 
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
   
    box-sizing: border-box;
    transition: background 0.3s;
    width:55%;
    margin: 25px auto 30px auto;
}

.btn-primary:hover {
    background-color: #333;
}

/* 6. CATEGORY CARDS (Image & Text) */

.category-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.category-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    margin:15px;
}

.category-card:hover {
    transform: translateY(-3px);
   
}

.category-card img {
    width: 100%;
    height: auto; /* Fixed height for consistency */
    object-fit: cover;
}

.cat-label {
    padding: 15px;
}

.cat-label h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.cat-label p {
    margin: 5px 0 0;
    color: #888;
    font-size: 14px;
}

/* 7. GAME SCREEN ELEMENTS */
.header {
   
   text-align: center;
    margin-bottom: 10px;
    font-size: 18px;
    color: #000;
    padding-bottom: 10px;
}
/* TIMER CONTAINER */
.timer-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
}

/* THE NUMBER TEXT */
#timer-display {
    position: absolute;
    font-size: 20px;       /* Smaller font to fit in circle */
    font-weight: 800;
    color: #10202f;        /* Navy Blue */
    z-index: 2;
}

/* SVG SETTINGS */
.timer-svg {
    transform: rotate(-90deg); /* Starts animation at top (12 o'clock) */
}

/* BACKGROUND CIRCLE (Light) */
.timer-bg {
    fill: none;
    stroke: #e0e0e0;       /* Light Grey */
    stroke-width: 2;
}

/* PROGRESS CIRCLE (Dark) */
.timer-bar {
    fill: none;
    stroke: #10202f;       /* Navy Blue matches Button */
    stroke-width: 2;
    stroke-linecap: round; /* Rounded ends for cleaner look */
    
    /* DASH ARRAY logic: 2 * PI * R (2 * 3.14 * 26 ≈ 163) */
    stroke-dasharray: 163;
    stroke-dashoffset: 0;  /* Starts full */
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}


#question-image {
    width: 100%;
   
    margin-bottom: 15px;
    object-fit: cover;
   
}
#game-content{text-align: center; margin: 25px;}
#question-text {
    font-size: 30px;
    font-weight: bolder;
    margin: 15px auto;
    color: #161616;
    text-align: center;
    width:95%
}

/* 8. ANSWER BUTTONS */
.btn-answer {
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #10202f;
    border-radius: 15px; /* Matches input style */
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    color:  #10202f;
    outline: none;
}

/* Hover only on non-touch devices to avoid 'sticky' hover on mobile */
@media (hover: hover) {
    .btn-answer:hover {
        background-color: #f9f9f9;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    }
}

.btn-answer.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* 9. FEEDBACK COLORS (Red/Green) */
.correct-answer {
    background-color: #4CAF50 !important; /* Green */
    color: white !important;
    border-color: #4CAF50 !important;
}

.wrong-answer {
    background-color: #F44336 !important; /* Red */
    color: white !important;
    border-color: #F44336 !important;
    animation: shake 0.5s;
}

/* Shake Animation for wrong answer */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* 10. RESULT SCREEN */
#screen-result {
    text-align: center;
   
}

#screen-result h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #000;
}
/* OVERLAY BACKGROUND */
.screen-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

/* WHITE POPUP BOX */
.popup-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 85%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: scale(0.8);
    animation: popIn 0.3s forwards;
}

/* GREEN CHECK ICON */
.icon-check {
    width: 50px; height: 50px;
    background: #4CAF50;
    color: white;
    font-size: 30px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
}
.popup-box h2 {
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0px;
   
    font-size: 26px;
}
p#level-msg{
    text-align: center;
    color: #000;
    font-size: 22px;
    margin: 0px 53px;
    padding-top:0px;
}

/* ANIMATIONS */
@keyframes popIn {
    to { transform: scale(1); }
}
/* Style for highlighting the correct answer when user is wrong/timeout */
.reveal-correct {
    background-color: #ffffff !important;    /* Keep background white */
    border: 3px solid #4CAF50 !important;    /* Thick Green Border */
    color: #4CAF50 !important;               /* Green Text */
    font-weight: 800;
}