* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Background image settings */
body {
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: white;
    font-family: Arial, sans-serif;
}

/* Make game-container grow to fill space above footer */
.game-container {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    margin: 20px auto;
    text-align: center;
    flex-grow: 1; /* pushes footer to bottom */
}

/* Footer styling */
.page-footer {
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9em;
    color: #bbb;
    font-style: italic;
    background: rgba(0, 0, 0, 0.5);
    user-select: none;
}


.title {
    font-size: 2.4em;
    color: #d4a373; /* warm gold */
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(212,163,115,0.8);
}

.subtitle {
    font-size: 1.2em;
    color: #b0b8c1; /* soft gray-blue */
    margin-bottom: 40px;
}

.play-section {
    margin-bottom: 30px;
}

.play-btn {
    background: linear-gradient(45deg, #56ab2f, #a8e063); /* fresh green gradient */
    border: none;
    border-radius: 50px;
    padding: 25px 60px;
    color: #202020; /* dark text for contrast */
    font-size: 2.5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(88, 171, 46, 0.6);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.play-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #74c32e, #c8f442);
    box-shadow: 0 10px 22px rgba(116, 195, 46, 0.85);
}

.play-btn:active {
    transform: scale(0.95);
}

.guess-section {
    margin-bottom: 20px;
}

.button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.check-btn {
    background: linear-gradient(45deg, #0e6655, #138d75); /* deep teal */
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    color: #ecf0f1; /* light text */
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(19, 141, 117, 0.4);
    transition: background-color 0.3s ease;
}

.check-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #14977e, #17c1a4);
}

.guess-label {
    font-size: 1.4em;
    color: #e0e6e9;
    margin-bottom: 15px;
    font-weight: 700;
}

.guess-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 3px solid #56ab2f;
    border-radius: 15px;
    text-align: center;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    color: #202020;
}

.guess-input:focus {
    outline: none;
    border-color: #a8e063;
    box-shadow: 0 0 10px #a8e063;
    transform: scale(1.03);
}

.reveal-btn {
    background: linear-gradient(45deg, #6a11cb, #2575fc); /* vibrant purple-blue */
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    color: #f5f7fa;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(37, 117, 252, 0.5);
    transition: background-color 0.3s ease;
}

.reveal-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #3d09e0, #6d92ff);
}

.reveal-section {
    margin-top: 30px;
    padding: 25px;
    background: rgba(23, 42, 58, 0.5);
    border-radius: 15px;
    border: 2px dashed #56ab2f;
    display: none;
    box-shadow: 0 0 20px rgba(86, 171, 47, 0.6);
}

.reveal-section.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    display: none;
}

.result-message.correct {
    background-color: #e6f4ea;
    color: #27ae60;
    border: 2px solid #27ae60;
    display: block;
}

.result-message.incorrect {
    background-color: #fce4e4;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    display: block;
}

.video-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(45deg, #34495e, #2c3e50);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #f0f0f0;
    font-size: 1.3em;
    margin-top: 15px;
    border: 3px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.video-icon {
    font-size: 3.2em;
    margin-bottom: 10px;
}

.new-game-btn {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    color: #f0f0f0;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
    margin-top: 25px;
}

.new-game-btn:hover {
    background-color: #6c7a7d;
    box-shadow: 0 6px 18px rgba(108, 122, 125, 0.6);
}

.playing {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.sound-waves {
    display: none;
    margin: 20px 0;
}

.sound-waves.playing {
    display: block;
}

#randomFactContainer {
    margin-top: 15px;
    margin-bottom: 25px; /* space before guess section */
    font-style: italic;
    font-weight: 600;
    min-height: 1.4em;
    text-align: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #ffcc70, #ff8177);
    color: #fff;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#randomFactContainer.show {
    transform: scale(1);
    opacity: 1;
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}


/* Big centered play button */
.big-play-btn {
    font-size: 2.5rem;
    padding: 25px 60px;
    border-radius: 50px;
    background-color: #27ae60;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(39, 174, 96, 0.4);
    transition: background-color 0.3s ease;
}

.big-play-btn:hover:not(:disabled) {
    background-color: #219150;
}

/* Show Video & Random Fact buttons styling */
.secondary-buttons button {
    font-size: 1.2rem;
    padding: 12px 28px;
    border-radius: 12px;
    background-color: #2980b9;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(41, 128, 185, 0.3);
    transition: background-color 0.3s ease;
}

.secondary-buttons button:hover:not(:disabled) {
    background-color: #1c5d8a;
}

/* Disabled button style for Random Fact */
#randomFactBtn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
    box-shadow: none;
}


