body {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Segoe UI', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #e0f2f7; /* Light blue background */
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.game-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 95%;
    max-width: 700px; /* Max width remains for overall container */
    box-sizing: border-box; /* Include padding in width */
    /* Centering content horizontally */
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center;    /* Center children horizontally */
}

h1 {
    color: #4CAF50; /* Green for happy theme */
    margin-bottom: 10px;
}

p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}

/* Difficulty Selection Styles */
.difficulty-selection {
    margin-bottom: 25px;
}

.difficulty-button {
    background-color: #f0f0f0;
    color: #555;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    margin: 0 5px;
    transition: all 0.2s ease;
}

.difficulty-button:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.difficulty-button.active {
    background-color: #00796b; /* Darker teal for active */
    color: white;
    border-color: #004d40;
    font-weight: bold;
    transform: scale(1.05);
}

#gameStatus {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 25px;
    color: #00796b; /* Darker teal */
}

#startButton { /* Keep this separate if its styling is unique */
    background-color: #2196F3; /* Blue */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    margin-top: 15px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#startButton:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
}
#startButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* CTA Button Style (for Play Again) */
.cta-button {
    background-color: #4CAF50; /* A strong green */
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.4em; /* Larger font */
    font-weight: bold;
    margin-top: 25px; /* Spacing from "Can you beat it?" */
    margin-bottom: 20px; /* Space before "Why play daily?" */
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}


#emojiGrid {
    display: grid;
    gap: 8px; /* Slightly reduce gap for larger grids */
    padding: 15px;
    border: 2px solid #b2dfdb; /* Light teal border */
    border-radius: 10px;
    background-color: #f8fcfd;
    min-height: 200px; /* Ensure some visible area even if empty */
    box-sizing: border-box;
}

.emoji-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em; /* Default large emoji size */
    background-color: #e3f2fd; /* Very light blue background for cells */
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    user-select: none; /* Prevent text selection */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

/* Adjust emoji size for smaller cells on larger grids */
#emojiGrid[data-difficulty="medium"] .emoji-cell {
    font-size: 2em; /* Slightly smaller for medium */
}

#emojiGrid[data-difficulty="hard"] .emoji-cell {
    font-size: 1.6em; /* Even smaller for hard */
}

.emoji-cell:hover {
    background-color: #bbdefb; /* Lighter blue on hover */
    transform: scale(1.03);
}

.emoji-cell.found {
    cursor: default;
    transform: scale(1.2); /* Make it larger */
    background-color: #a7f3d0; /* A light green */
}

.emoji-cell.happy {
    /* No specific style, just for identification in JS */
}

/* Benefits Link */
.benefits-link {
    color: #00796b; /* Darker teal, consistent with game's accent colors */
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.2s ease;
}
.benefits-link:hover {
    color: #004d40; /* Even darker teal on hover */
    text-decoration: none;
}

/* Style for Benefits Link within GameOverMessage */
.benefits-link-container-endgame {
    margin-top: 0px; /* Adjust spacing as needed */
    padding-top: 0px; /* Remove padding */
    border-top: none; /* Remove border */
    text-align: center;
}


.hidden {
    display: none;
}

#gameOverMessage {
    margin-top: 25px;
    background-color: #e0f7fa; /* Light cyan */
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #b2ebf2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#gameOverMessage h2 {
    color: #00796b;
    margin-bottom: 10px;
}

#gameOverMessage p {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
}

/* Style for "Can you beat it?" text */
.can-you-beat-it {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
    margin-top: 20px; /* Spacing from Share section */
    margin-bottom: 20px; /* Spacing before Play Again button */
}


/* Share Section Styles */
.share-section {
    margin-top: 20px; /* Spacing from score */
    padding-top: 0px; /* Remove padding */
    border-top: none; /* Remove border */
}

.share-section h3 {
    color: #00796b;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 10px; /* Space between buttons */
}

.share-button {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-button:hover {
    transform: translateY(-1px);
}

/* Specific Social Media Colors */
.x-button {
    background-color: #000000; /* Black for X */
}
.x-button:hover {
    background-color: #333333;
}

.facebook-button {
    background-color: #1877F2;
}
.facebook-button:hover {
    background-color: #0f62d1;
}

.whatsapp-button {
    background-color: #25D366;
}
.whatsapp-button:hover {
    background-color: #1fb854;
}

.linkedin-button {
    background-color: #0A66C2; /* LinkedIn Blue */
}
.linkedin-button:hover {
    background-color: #004182;
}