/*
Global Reset And Font
Remove default margins/paddings and set font
*/

* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box; /* Ensures padding and border are included in width/height */
}

/* Body Styling
Background color for the entire page */
body {
    background: #981212;
}

/* Welcome page styling
Centered welcome message with full viewport height */
.welcome-page {
    display: flex;
    flex-direction: column;  /* stack elements vertically */
    justify-content: center; /* center vertically */
    align-items: center;    /* center horizontally */ 
    height: 100vh;          /* Full viewport height */
    text-align: center;
    background: #921f6a;
    color: white;
}

/* Welcome Page Heading */
.welcome-page h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

/* Welcome Page Paragraph */
.welcome-page p {
    font-size: 18px;
    margin-bottom: 30px;
}

#welcome-page button, #start-btn {
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 15px 30px;     /* Top/Bottom and Left/Right padding */
    font-size: 18px;
    border-radius: 8px;     /* Rounded corners */
    cursor: pointer;
    transition: 0.3s;       /* Smooth hover transition */
}

#welcome-page button:hover, #start-btn:hover {
    background: #45a049;
}

/*Quiz App Containe */
.app{
    background: #fff;
    width: 90%;         /* Responsive width */
    max-width: 600px;   /* Max width for larger screens */
    margin: 100px auto 0;   /* Center horizontally and add top spacing */
    border-radius: 10px;
    padding: 30px;  /* Inner spacing */
}

/* Quiz App Heading */
.app h1{
    font-size: 25px;
    color: #001e4d;
    font-weight: 600;
    border-bottom: 1px solid #333;  /* Bottom border for separation */
    padding-bottom: 30px;
}

/* Quiz Section Padding */
.quiz{
    padding: 20px 0;
}

/* Question Text Styling */
.quiz h2{
    font-size: 18px;
    color: #001e4d;
    font-weight: 600;
}

/* Answer Buttons */
.btn{
    background: #fff;
    color: #222;
    font-weight: 500;
    width: 100%;
    border: 1px solid #222;
    padding: 10px;
    margin: 10px 0; /* Vertical spacing between buttons */
    text-align: left;
    border-radius: 4px; /* Slightly rounded corners */
    cursor: pointer;
    transition: all 0.3s;
}

/* Hover Effect for Answer Buttons (only when enabled) */
.btn:hover:not([disabled]){
    background: #222;
    color: #fff;
}

/* Disabled Buttons Styling */
.btn:disabled{
    cursor: auto;
}

/* Timer Container & Circle */ 
.timer-container{
    display: flex;
    justify-content:end;    /* Align timer to the right */
    margin: 15px 0;
}
.timer-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%; /* Make circle */
    background: conic-gradient(#4caf50 360deg, #ddd 0deg);
    display: flex;
    align-items: center;    /* Center timer text vertically */
    justify-content: center;    /* Center timer text Horizontally */
    transition: background 0.3s linear; /* Smooth background color change */
}

/* Timer Text */
.timer-circle span {
    font-size: 28px;
    font-weight: bold;
    color: #222;
}

/* Warning Animation for Last 3 Seconds */
.timer-circle.warning {
  animation: pulse 1s infinite; /* Pulse animation */
}

/* Pulse Keyframes */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Hide timer (used when quiz ends) */
.timer-hidden {
  display: none;
}

/* Next Button Styling */
#next-btn{
    background:#001e4d;
    color: #fff;
    font-weight: 500;
    width:150px;
    border: 0;
    padding: 10px;
    margin: 20px auto 0;    /* Center horizontally */
    border-radius: 4px;
    cursor: pointer;
    display: none;
}
.correct{
    background: #85BB65;
}
.incorrect{
    background: #a43f3f;
}

/* Mobile Responsive styles 
Applies only on small screens */
@media (max-width: 768px){

    .app {
        width: 95%;
        margin: 40px auto;
        padding: 20px;
    }
    .app h1 {
        font-size: 22px;
    }
    .quiz h2 {
        font-size: 16px;
    }
    .btn {
        font-size: 16px;
        padding: 12px;
    }
    .timer-container {
        justify-content: center;
    }
    .timer-circle {
        width: 70px;
        height: 70px;
    }
    .timer-circle span {
        font-size: 22px;
    }
    #next-btn {
        width: 100%;
    }
    .welcome-page p {
        font-size: 16px;
    }
    #start-btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}