/* General Body Styles */
body {
    font-family: 'Merriweather', serif;
    background-color: #f5f0e1; /* Light beige background */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem; /* Adjusted padding */
    margin: 0;
    min-height: 100vh;
    color: #3a2d24; /* Dark brown text default */
}

/* Main Heading */
h1 {
    font-size: 2.5rem; /* Slightly larger */
    font-weight: bold;
    color: #8b4513; /* Brown color */
    margin-bottom: 2rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    color: #5c4033; /* Medium brown */
    margin-top: 1rem;
    display: none; /* Hidden by default, shown by JS */
}

/* Main Content Area */
main {
    width: 90%;
    max-width: 500px; /* Limit width */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Controls Section (Dropdown) */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: #8b4513; /* Brown text */
    font-size: 1.1rem;
}

.controls label {
    margin-right: 0.5rem;
}

.controls select {
    padding: 0.5rem 1rem;
    border: 1px solid #d2b48c; /* Light brown border */
    border-radius: 0.375rem;
    background-color: #fffaf0; /* Floral white background */
    color: #8b4513;
    font-family: 'Merriweather', serif;
    cursor: pointer;
}

/* Word Container Styling */
#wordContainer {
    background-color: #fffaf0; /* Floral white background */
    border: 2px solid #d2b48c; /* Light brown border */
    border-radius: 0.75rem; /* More rounded corners */
    padding: 2rem;
    width: 100%; /* Take full width of main */
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2); /* Brownish shadow */
    text-align: left; /* Align text left */
    margin-bottom: 1.5rem;
    opacity: 1; /* Ensure it's visible */
    transition: opacity 0.3s ease;
}

#generatedWord {
    font-size: 2rem; /* Larger font size */
    color: #d08c3a; /* Orange color */
    font-weight: bold;
    margin-bottom: 0.5rem;
    min-height: 2.5rem; /* Prevent layout shift */
}

#pronunciation {
    font-style: italic;
    color: #5c4033; /* Medium brown */
    margin-bottom: 1rem;
    min-height: 1.2rem; /* Prevent layout shift */
}

#wordDefinition {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    min-height: 1.5rem; /* Prevent layout shift */
}

#otherFormsHeading {
    font-weight: bold;
    color: #d08c3a; /* Orange color */
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

#permutationList {
    list-style-type: disc;
    padding-left: 1.5rem; /* Indent list */
    margin: 0;
}

#permutationList li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #3a2d24;
}

/* Buttons Section */
.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem; /* Space between buttons */
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Fully rounded */
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    border: none;
    font-family: 'Merriweather', serif;
}

.btn-generate {
    background-color: #e89f43; /* Orange */
}

.btn-generate:hover {
    background-color: #d08c3a; /* Darker orange */
    transform: scale(1.05);
}

.btn-copy {
    background-color: #a0522d; /* Brown */
}

.btn-copy:hover {
    background-color: #8b4513; /* Darker brown */
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    main {
        width: 95%;
    }
    #wordContainer {
        padding: 1.5rem;
    }
    .controls {
        flex-direction: column;
        align-items: stretch;
        font-size: 1rem;
    }
    .controls label {
        margin-bottom: 0.5rem;
        text-align: center;
    }
    .controls select {
        width: 100%;
    }
    .buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}



/* Play Game Button Style */
.btn-play {
    background-color: #28a745; /* Green */
}

.btn-play:hover {
    background-color: #218838; /* Darker green */
    transform: scale(1.05);
}



/* Utility class to hide elements */
.hidden {
    display: none !important; /* Use !important to ensure override */
}



/* Like Button Style */
.btn-like {
    background-color: #ff69b4; /* Pink */
    color: white;
    margin-left: 10px; /* Add some space next to Copy button */
    padding: 8px 12px;
    font-size: 0.9em;
    vertical-align: middle; /* Align with other buttons */
}

.btn-like:hover {
    background-color: #ff1493; /* Deeper pink */
    transform: scale(1.05);
}

.btn-like:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}



/* Game Page Specific Styles */
#gameContainer {
    background-color: #fffaf0; /* Floral white background */
    border: 2px solid #d2b48c; /* Light brown border */
    border-radius: 0.75rem; /* More rounded corners */
    padding: 2rem;
    width: 100%; /* Take full width of main */
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2); /* Brownish shadow */
    text-align: left; /* Align text left */
    margin-bottom: 1.5rem;
    margin-top: 1.5rem; /* Add some top margin */
}

/* Style choice buttons */
#choices-area button {
    display: block; /* Make buttons stack vertically */
    width: 100%; /* Full width */
    margin-bottom: 0.75rem; /* Space between buttons */
    padding: 0.75rem 1rem;
    border-radius: 0.375rem; /* Slightly rounded */
    font-weight: normal; /* Normal weight */
    color: #3a2d24; /* Dark brown text */
    background-color: #f5f0e1; /* Light beige background */
    border: 1px solid #d2b48c; /* Light brown border */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    text-align: left; /* Align text left */
    font-family: 'Merriweather', serif;
}

#choices-area button:hover {
    background-color: #e8dcc8; /* Slightly darker beige */
    transform: scale(1.02);
}

#choices-area button.correct {
    background-color: #d4edda; /* Light green for correct */
    border-color: #c3e6cb;
    color: #155724;
}

#choices-area button.incorrect {
    background-color: #f8d7da; /* Light red for incorrect */
    border-color: #f5c6cb;
    color: #721c24;
}

/* Adjust score area */
#score-area {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #d2b48c; /* Separator line */
    color: #5c4033; /* Medium brown */
}

/* Back link styling */
.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #8b4513; /* Brown color */
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Responsive adjustments for game */
@media (max-width: 600px) {
    #gameContainer {
        padding: 1.5rem;
    }
}

