html {
    overflow: hidden; /* Prevent any scrolling on html level initially */
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: 
        url('pasta-pattern.svg'),
        linear-gradient(135deg, #e6a700 0%, #cc4f03 100%);
    background-attachment: fixed;
    background-size: 800px 800px, cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh; /* Fixed height instead of min-height */
    padding-top: 90px; /* Space for fixed header */
    padding-bottom: 80px; /* Space for footer */
    overflow: auto; /* Only show scrollbar when content exceeds body height */
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #ffae00  0%, #df9800  100%);
    color: white;
    padding: 15px 0;
    z-index: 9999; /* Higher z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
    gap: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header h1 {
    margin: 0;
    font-size: 48px; /* Larger font size */
    font-family: Georgia, serif; /* Matching SVG font */
    font-weight: bold;
    letter-spacing: 8px; /* Add spacing between letters */
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Subtle shadow for better contrast */
}

.header-subtitle {
    font-size: 16px;
    margin: 0;
}

.nav-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.streak-display {
    font-size: 18px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 2px;
}

h1 {
    text-align: center;
    margin: 0;
    padding: 0;
}

.pasta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
    padding-bottom: 80px; /* Space for footer */
    box-sizing: border-box;
}

.input-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin-top: 30px;
    margin-left: 10px;
    margin-right: 10px;
}

#guessInput {
    border: 1px solid #ccc; /* Reverting to dark theme */
    border-radius: 20px;
    background-color: #333; /* Dark gray */
    color: white; /* White text */
    padding: 10px 45px 10px 15px; /* Extra padding-right for arrow button */
    font-size: 16px;
    outline: none;
    width: 100%;
    box-shadow: none; /* Removing light theme shadow */
    box-sizing: border-box;
}

.guess-counter {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

.input-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #c7c7c7;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-arrow:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#guessInput:focus {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); /* Subtle focus effect */
}

#guessInput::placeholder {
    color: #bbb; /* Lighter placeholder text */
}

#submitGuess {
    display: none; /* Hide the submit guess button */
}

#suggestionBox {
    position: absolute;
    border: none;
    background-color: #333; /* Dark background */
    color: white; /* White text */
    z-index: 1000;
    display: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* Subtle shadow */
    max-height: 200px;
    overflow-y: auto;
}

#suggestionBox div {
    padding: 10px 15px;
    cursor: pointer;
    background-color: transparent;
    color: white; /* White text */
    border-radius: 0;
    transition: background-color 0.2s;
}

#suggestionBox div:hover {
    background-color: #444; /* Slightly lighter hover effect */
}

#suggestionBox div:first-child {
    border-radius: 12px 12px 0 0;
}

#suggestionBox div:last-child {
    border-radius: 0 0 12px 12px;
}

#suggestionBox div:only-child {
    border-radius: 12px;
}

.guess-card {
    background-color: #333; /* Reverting to gray */
    color: white;
    border-radius: 16px;
    padding: 15px;
    margin: 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 90%; /* Make cards flexible width */
    max-width: 550px;
}

.guess-card:last-child {
    margin-bottom: 20px; /* Ensure proper spacing for the final card */
}

.top-half {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px; /* Space between top and bottom halves */
}

.top-half img {
    width: 110px; /* Increase image size by 10% */
    height: auto;
    border-radius: 5px;
    margin-right: 10px; /* Space between image and name */
}

.top-half h3 {
    margin: 0;
    font-size: 20px; /* Increased font size for guessed name */
    flex-grow: 1;
    text-align: center; /* Center the guessed name */
    display: flex;
    justify-content: center; /* Ensure proper centering */
    align-items: center; /* Vertically center the text */
}

.top-half .guess-number {
    font-size: 16px; /* Adjusted font size for guess number */
    margin-left: 10px; /* Space between name and number */
}

.bottom-half {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 hints per row */
    gap: 10px; /* Space between hint cards */
}

.category-card {
    background-color: #444; /* Reverting to gray */
    color: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: none;
}

.category-card .title {
    font-weight: bold;
    margin-bottom: 5px;
    color: white; /* Reverting title color */
}

.category-card .details {
    margin: 0;
}

#result {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    padding-top: 10px;
    padding-bottom: 80px; /* Space for footer */
    box-sizing: border-box;
}

.hints-container {
    margin-top: 10px;
}

.correct-message {
    background-color: #4caf50;
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    margin-top: 50px;
    gap: 20px;
}

.header-nav h1 {
    margin: 0;
    font-size: 18px;
}

.pasta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
    padding-top: 30px; /* Space from header */
    padding-bottom: 80px; /* Space for footer */
    box-sizing: border-box;
}

/* Footer styles */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: linear-gradient(135deg, #d14600 0%, #b33d00 100%);
    color: white;
    padding: 15px 0;
    text-align: center;
    z-index: 1000;
    border-top: none;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-content p {
    margin: 0;
    font-size: 14px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    margin: 0 5px;
    cursor: pointer;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    color: black;
    line-height: 1.6;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
}

.modal-content h2 {
    margin-top: 0;
    color: #e85d04;
}

.legal-container {
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    padding: 24px 16px 120px;
}

.legal-card {
    background: rgba(255, 255, 255, 0.97);
    color: #222;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    margin-bottom: 80px;
}

.legal-card h2,
.legal-card h3 {
    color: #b33d00;
}

.legal-card h2 {
    margin-top: 0;
}

.legal-card p,
.legal-card li {
    line-height: 1.6;
}

.legal-card ul {
    padding-left: 20px;
}
