:root {
    /* Light Mode Colors */
    --base-color: #ffffff;
    --text-color: #313030;
    --secondary-text: #6a6969;
    --primary-color: #f0f0f0;
    --accent-color: #c8e9ec;
    --button-color: #538d4e;
    --button-hover: #6aaa64;
    --input-bg: #ffffff;
    --input-text: #313030;
    --border-radius: 8px;  /* Soft rounded corners */
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);  /* Softer shadow for depth */
}

/* Dark mode overrides */
.darkmode {
    --base-color: #1e1e1e;
    --text-color: #f0f0f0;
    --secondary-text: #b0b0b0;
    --primary-color: #2a2a2a;
    --accent-color: #7aa9ad;
    --button-color: #65a160;
    --button-hover: #7bb475;
    --input-bg: #333333;
    --input-text: #f0f0f0;
}

/* Body setup */
body {
    font-family: 'Roboto', sans-serif; /* Modern font */
    background-color: var(--base-color);
    color: var(--text-color);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container styling */
.container {
    background-color: var(--primary-color);
    padding: 25px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 450px;
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
    text-align: center;
}

/* Header styling */
h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 600; /* Slightly heavier font */
}

/* Riddle box styling */
.riddle-box {
    background-color: var(--accent-color);
    color: #1e1e1e;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}

/* Input field styling */
input {
    width: 85%;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 15px;
    background-color: var(--input-bg);
    color: var(--input-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Button styling */
button {
    background-color: var(--button-color);
    color: white;
    border: none;
    padding: 12px 18px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: var(--button-hover);
    transform: scale(1.05);  /* Subtle scaling effect */
}

/* Hint box styling */
.hint-box {
    position: absolute;
    top: 120px;
    right: 20px;
    background-color: var(--accent-color);
    color: #1e1e1e;
    padding: 18px 22px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 9999;
    max-width: 250px;
    font-size: 15px;
    transition: opacity 0.3s ease;
    display: none; /* Hidden by default */
}

/* Lives display styling */
#lives {
    font-size: 18px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    padding: 10px 18px;
    border-radius: var(--border-radius);
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--box-shadow);
    z-index: 100;
}

/* Top-right buttons for theme and hint */
.top-right-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;  /* Align the items vertically centered */
    gap: 12px;
}

.top-right-buttons button {
    height: 55px;
    width: 55px;
    background-color: var(--base-color);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.top-right-buttons button:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.top-right-buttons svg {
    fill: var(--text-color);
}

.streak-box {
    font-size: 1.1rem;
    color: #ff6600;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: var(--text-color); /* Ensure it follows the theme */
}

/* Dark mode theme toggle button */
#theme-switch svg:last-child {
    display: none;
}

.darkmode #theme-switch svg:first-child {
    display: none;
}

.darkmode #theme-switch svg:last-child {
    display: block;
}

/* Hint Button Active State */
#hint-btn.active {
    border: 2px solid var(--accent-color);
}

/* Hint Box Visibility Toggle */
#hint-btn:focus {
    outline: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
 .modal-content {
    background: var(--primary-color);  /* match theme background */
    color: var(--text-color);          /* apply theme text color */
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    animation: scaleUp 0.3s ease-out forwards;
}
  
  @keyframes scaleUp {
    from {
      transform: scale(0.8);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }

/* Mobile adjustments */
@media (max-width: 600px) {
    /* Make sure the top-right buttons stay horizontal */
    .top-right-buttons {
        flex-direction: row; /* Keep them in a row */
        justify-content: space-between; /* Space between the buttons */
        gap: 12px; /* Ensure there's space between buttons */
        right: 10px; /* Adjust position for small screens */
        top: 20px; /* Keep it at the top */
    }

    /* Make the streak counter look good on mobile */
    .streak-box {
        font-size: 1rem;  /* Slightly smaller font for mobile */
        margin-top: 0;
        display: flex;
        align-items: center;
    }

    /* Adjust lives display */
    #lives {
        position: relative;  /* Allow it to stay in the flow */
        top: -180px;  /* Reset the top positioning */
        margin-top: 10px; /* Add margin to give space below */
        left: 50%;
        transform: translateX(-50%);  /* Center horizontally */
        width: auto;  /* Use auto to shrink it to fit its content */
        max-width: 200px;  /* Limit width to a more compact size */
        font-size: 1.2rem;  /* Adjust font size for readability */
        text-align: center;
        padding: 8px 12px;  /* Reduced padding for a more compact look */
        background-color: var(--accent-color);
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        z-index: 100;
    }

    /* Stack everything vertically on small screens */
    #main-content {
        padding-top: 120px; /* Adjust to ensure no overlap with the top bar */
    }
}


  
  