/*
   CSS FILE - This makes our game look pretty!
   CSS = Cascading Style Sheets

   We use selectors to pick what we want to style:
   - A dot (.) means a class
   - A hashtag (#) means an id
   - Just a word means an HTML tag
*/

/* Material Symbols base style - makes icons look filled and nice */
.material-symbols-rounded {
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

/* Style for the whole page */
body {
    /* This sets the font for all text */
    font-family: 'Comic Sans MS', cursive, sans-serif;

    /* This sets the background color - try changing it! */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* This removes the white space around the edges */
    margin: 0;
    padding: 0;

    /* This makes the page take up the full height */
    min-height: 100vh;

    /* This centers everything */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Back button - takes you back to the main game portal */
.back-btn {
    /* Position it in the top-left corner of the game box */
    position: absolute;
    left: 12px;
    top: 12px;
    color: #764ba2;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(118, 75, 162, 0.1);
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(118, 75, 162, 0.25);
}

/* Subtitle showing "Shivanya's Game World" */
.subtitle {
    color: #999;
    font-size: 0.85em;
    margin-top: -8px;
    margin-bottom: 12px;
}

/* Style for the game container box */
.game-container {
    /* Background color - white with some transparency */
    background-color: rgba(255, 255, 255, 0.95);

    /* Rounded corners */
    border-radius: 20px;

    /* Space inside the box */
    padding: 40px;

    /* Center the text */
    text-align: center;

    /* Needed so the back button positions relative to this box */
    position: relative;

    /* Add a shadow to make it pop */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    /* Set a maximum width */
    max-width: 400px;
    width: 90%;
}

/* Style for the main title */
h1 {
    /* Text color - try changing this! */
    color: #764ba2;

    /* Size of the text */
    font-size: 2.5em;

    /* Space below the title */
    margin-bottom: 10px;
}

/* Style for the instructions */
.instructions {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Style for the score board */
.score-board {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.score-board p {
    margin: 5px 0;
    font-size: 1.3em;
    color: #333;
}

/* Style for the score and timer numbers */
#score, #timer {
    font-weight: bold;
    color: #667eea;
    font-size: 1.5em;
}

/* Style for the star button - the main clickable thing! */
.star-button {
    /* Remove the default button style */
    background: none;
    border: none;

    /* Change the mouse cursor to a pointer hand */
    cursor: pointer;

    /* Add a fun animation */
    transition: transform 0.1s;

    /* Space around the button */
    padding: 20px;
    margin: 20px 0;

    /* Make the star gold colored */
    color: #FFD700;
}

/* Make the star icon inside the button big */
.star-button .material-symbols-rounded {
    /* Make the icon really big */
    font-size: 100px;
}

/* When you hover over the star */
.star-button:hover {
    /* Make it bigger */
    transform: scale(1.2);
}

/* When you click the star */
.star-button:active {
    /* Make it smaller for a "pressed" effect */
    transform: scale(0.9);
}

/* When the game hasn't started, make the star look inactive */
.star-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

/* Style for the control buttons container */
.control-buttons {
    margin-top: 20px;
}

/* Style for both control buttons */
.control-btn {
    /* Padding inside the button */
    padding: 15px 30px;

    /* Text size */
    font-size: 1.2em;

    /* Rounded corners */
    border-radius: 25px;

    /* Remove default border */
    border: none;

    /* Pointer cursor */
    cursor: pointer;

    /* Smooth animation */
    transition: all 0.3s;

    /* Space between buttons */
    margin: 5px;

    /* Make text bold */
    font-weight: bold;
}

/* Style for the Start button */
.start-btn {
    background-color: #4CAF50;
    color: white;
}

.start-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

/* Style for the Reset button */
.reset-btn {
    background-color: #2196F3;
    color: white;
    display: none; /* Hidden at first */
}

.reset-btn:hover {
    background-color: #1976D2;
    transform: scale(1.05);
}

/* Style for the message at the end */
.message {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 20px;
    min-height: 40px;
}

/* Different colors for different score levels */
.amazing {
    color: #FFD700; /* Gold */
}

.great {
    color: #4CAF50; /* Green */
}

.good {
    color: #2196F3; /* Blue */
}

.try-again {
    color: #FF6B6B; /* Red */
}

/* Hero credit badge - stylish pink banner */
.created-by {
    text-align: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2em;
    margin-top: 20px;
    padding: 10px 28px;
    color: #fff;
    background: linear-gradient(135deg, #E91E63, #FF4081, #F50057);
    border-radius: 30px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: createdByGlow 2s ease-in-out infinite alternate;
}

@keyframes createdByGlow {
    from { box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4); }
    to   { box-shadow: 0 4px 25px rgba(233, 30, 99, 0.7), 0 0 40px rgba(255, 64, 129, 0.3); }
}
