/* Custom styles for Wisdom Grid */

/* Base styles */
body {
    background-color: #0F172A;
    color: #E2E8F0;
    transition: background-color 0.3s ease;
}

/* Menu and Settings Containers */
.menu-container,
.settings-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0F172A;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.menu-content,
.settings-content {
    background-color: #1E293B;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 500px;
    width: 90%;
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn {
    background-color: #334155;
    color: #E2E8F0;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.menu-btn:hover {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Settings Options */
.settings-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10B981;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* How to Play Content */
.how-to-play-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.how-to-play-content p {
    line-height: 1.5;
}

/* Menu Icon Button */
.menu-icon-btn {
    background: none;
    border: none;
    color: #E2E8F0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.menu-icon-btn:hover {
    background-color: #334155;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Game container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Game title */
h1 {
    color: #E2E8F0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

/* Stats container */
.stats-container {
    display: flex;
    gap: 2rem;
    font-size: 1.1rem;
    color: #94A3B8;
}

.current-streak, .best-streak {
    background-color: #1E293B;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quote Display Area */
#quote-display {
    background-color: #1E293B;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

#quote-boxes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    word-break: keep-all;
    overflow-x: auto;
    padding: 0.5rem;
}

/* Quote box styling */
.quote-box {
    width: 40px;
    height: 40px;
    border: 2px solid #334155;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #1E293B;
    color: #E2E8F0;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.quote-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Space between words */
.word-space {
    width: 20px;
    flex-shrink: 0;
}

/* Punctuation styling */
.punctuation {
    color: #E2E8F0;
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0 2px;
    flex-shrink: 0;
}

/* Hint number styling */
.hint-number {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.75rem;
    color: #FBBF24;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Game controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.hint-btn {
    background-color: #334155;
    color: #E2E8F0;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hint-btn:hover:not(:disabled) {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-count {
    font-size: 0.9rem;
    color: #FBBF24;
    margin-left: 0.5rem;
}

/* Keyboard styling */
.keyboard-container {
    background-color: #1E293B;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 800px;
    margin: 0 auto;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

/* Keyboard button styling */
.key-btn {
    padding: 0.75rem;
    min-width: 2.5rem;
    border: 2px solid #334155;
    border-radius: 0.5rem;
    background-color: #334155;
    color: #E2E8F0;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key-btn:hover:not(.correct):not(.incorrect) {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.key-btn:active:not(.correct):not(.incorrect) {
    transform: scale(0.95);
}

/* Keyboard states */
.key-btn.correct {
    background-color: #10B981;
    border-color: #059669;
    color: white;
    cursor: not-allowed;
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.key-btn.incorrect {
    background-color: #EF4444;
    border-color: #DC2626;
    color: white;
    cursor: not-allowed;
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Message area styling */
#message-area {
    min-height: 2rem;
    margin: 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.message-success {
    color: #10B981;
    text-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.message-error {
    color: #EF4444;
    text-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes winAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes loseAnimation {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(0);
    }
}

.quote-box {
    animation: fadeIn 0.3s ease-out;
}

.key-btn {
    animation: popIn 0.2s ease-out;
}

.win-animation {
    animation: winAnimation 0.5s ease-out;
}

.lose-animation {
    animation: loseAnimation 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    #quote-display {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    #quote-boxes {
        gap: 0.25rem;
        padding: 0.25rem 0;
    }

    .quote-box {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .word-space {
        width: 10px;
    }

    .punctuation {
        font-size: 0.9rem;
        margin: 0 0.5px;
    }

    .hint-number {
        font-size: 0.5rem;
        top: 1px;
        right: 1px;
    }

    .key-btn {
        padding: 0.4rem;
        min-width: 1.8rem;
        font-size: 0.9rem;
    }

    .keyboard-container {
        padding: 1rem 0.5rem;
    }

    .keyboard-row {
        gap: 0.25rem;
    }

    .hint-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .menu-content,
    .settings-content {
        padding: 1.5rem;
    }

    .switch {
        width: 50px;
        height: 28px;
    }

    .slider:before {
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
    }

    input:checked + .slider:before {
        transform: translateX(22px);
    }

    .in-game-settings .settings-content {
        padding: 1.5rem;
    }

    .quote-meaning {
        padding: 0.8rem;
    }

    .quote-meaning h3 {
        font-size: 1.1rem;
    }

    .quote-meaning p {
        font-size: 1rem;
    }
}

/* In-game Settings Overlay */
.in-game-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.in-game-settings .settings-content {
    background-color: #1E293B;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 400px;
    width: 90%;
    animation: fadeIn 0.3s ease-out;
}

/* Quote Meaning */
.quote-meaning {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #1E293B;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

.quote-meaning h3 {
    color: #FBBF24;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.quote-meaning p {
    color: #E2E8F0;
    line-height: 1.5;
    font-size: 1.1rem;
}

/* Custom SweetAlert2 Styles */
.swal2-dark {
    background-color: #1E293B !important;
    color: #E2E8F0 !important;
}

.swal2-title-custom {
    color: #FBBF24 !important;
}

.swal2-html-container-custom {
    color: #E2E8F0 !important;
}

.swal2-close {
    color: #E2E8F0 !important;
}

.swal2-styled.swal2-confirm {
    background-color: #10B981 !important;
    border: none !important;
    box-shadow: none !important;
}

.swal2-styled.swal2-cancel {
    background-color: #EF4444 !important;
    border: none !important;
    box-shadow: none !important;
}
.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
}

.category-btn {
    background:  #4a5568;
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-btn:hover {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-btn:focus,
.category-btn:active {
    outline: none;
    transform: translateY(0);
    border-color: #63b3ed; /* light blue border for active state */
    background: linear-gradient(135deg, #2d3748, #1a202c);
}
