:root {
    /* Default Theme - Sage Green */
    --color-cream: #F6F0D7;
    --color-light-green: #C5D89D;
    --color-sage: #9CAB84;
    --color-olive: #89986D;

    --primary-color: var(--color-olive);
    --primary-light: var(--color-light-green);
    --accent-color: var(--color-olive);
    --bg-color: var(--color-cream);

    --grid-container-bg: var(--color-light-green);
    --grid-bg: #fff;

    --text-color: #3b4230;
    --highlight-color: #ebe5cf;
    --selected-cell: #C5D89D;
    --correct-color: #27ae60;
}

/* Theme 1: Pastel */
body.theme-pastel {
    --color-cream: #fff5f7;
    --color-light-green: #ffe4e8;
    --color-sage: #ffb3ba;
    --color-olive: #d4a5a5;
    --bg-color: #fff5f7;
    --grid-container-bg: #ffe4e8;
    --text-color: #4a4a4a;
    --highlight-color: #ffc9d0;
    --selected-cell: #ffb3ba;
}

/* Theme 2: Neon */
body.theme-neon {
    --color-cream: #1a1a2e;
    --color-light-green: #8338ec;
    --color-sage: #fb5607;
    --color-olive: #ff006e;
    --bg-color: #1a1a2e;
    --grid-container-bg: #2d2d44;
    --grid-bg: #3a3a52;
    --text-color: #eaeaea;
    --highlight-color: #fb5607;
    --selected-cell: #8338ec;
}

/* Theme 3: Dark */
body.theme-dark {
    --color-cream: #2c2c2c;
    --color-light-green: #495057;
    --color-sage: #adb5bd;
    --color-olive: #6c757d;
    --bg-color: #2c2c2c;
    --grid-container-bg: #3a3a3a;
    --grid-bg: #454545;
    --text-color: #e0e0e0;
    --highlight-color: #6c757d;
    --selected-cell: #495057;
}

/* Theme 4: Nature */
body.theme-nature {
    --color-cream: #f4f1e8;
    --color-light-green: #b8d4c8;
    --color-sage: #6fa287;
    --color-olive: #4a7c59;
    --bg-color: #f4f1e8;
    --grid-container-bg: #b8d4c8;
    --text-color: #2d3e2d;
    --highlight-color: #a8c9bb;
    --selected-cell: #6fa287;
}

/* Theme 5: Sky */
body.theme-sky {
    --color-cream: #e3f2fd;
    --color-light-green: #bbdefb;
    --color-sage: #42a5f5;
    --color-olive: #1976d2;
    --bg-color: #e3f2fd;
    --grid-container-bg: #bbdefb;
    --text-color: #1e3a5f;
    --highlight-color: #90caf9;
    --selected-cell: #42a5f5;
}

/* Theme 6: Coffee */
body.theme-coffee {
    --color-cream: #f5ebe0;
    --color-light-green: #d7ccc8;
    --color-sage: #a0826d;
    --color-olive: #6f4e37;
    --bg-color: #f5ebe0;
    --grid-container-bg: #d7ccc8;
    --text-color: #3e2723;
    --highlight-color: #bcaaa4;
    --selected-cell: #a0826d;
}

/* Theme 7: Light */
body.theme-light {
    --color-cream: #ffffff;
    --color-light-green: #f5f5f5;
    --color-sage: #bdbdbd;
    --color-olive: #9e9e9e;
    --bg-color: #ffffff;
    --grid-container-bg: #f5f5f5;
    --text-color: #212121;
    --highlight-color: #e0e0e0;
    --selected-cell: #bdbdbd;
}

/* Theme 8: Warm */
body.theme-warm {
    --color-cream: #fff8f0;
    --color-light-green: #fdebd0;
    --color-sage: #f39c12;
    --color-olive: #e67e22;
    --bg-color: #fff8f0;
    --grid-container-bg: #fdebd0;
    --text-color: #4a3520;
    --highlight-color: #f8d9a3;
    --selected-cell: #f39c12;
}

/* Theme 9: Spring */
body.theme-spring {
    --color-cream: #fffef7;
    --color-light-green: #dcedc8;
    --color-sage: #aed581;
    --color-olive: #7cb342;
    --bg-color: #fffef7;
    --grid-container-bg: #dcedc8;
    --text-color: #3d5a3d;
    --highlight-color: #c5e1a5;
    --selected-cell: #aed581;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

header {
    margin: 20px 0;
    text-align: center;
    position: relative;
    width: 90%;
    max-width: 800px;
}

h1 {
    font-weight: 800;
    font-size: 2.5rem;
    /* Slightly smaller for mobile safe */
    margin-bottom: 0.2rem;
    color: var(--color-olive);
}

p.subtitle {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-sage);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Menu Overlay Styles */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.menu-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(137, 152, 109, 0.2);
    border: 4px solid var(--color-light-green);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.topic-btn {
    background: var(--color-light-green);
    color: var(--text-color);
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    border-bottom: 4px solid var(--color-sage);
}

.topic-btn:hover {
    transform: translateY(-2px);
    background: var(--color-sage);
    color: white;
}

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--color-sage);
    font-weight: bold;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 2px solid var(--color-light-green);
}

.divider span {
    padding: 0 10px;
}

#custom-input-area textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid var(--color-light-green);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

#custom-input-area textarea:focus {
    outline: none;
    border-color: var(--color-olive);
}

.form-group input {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 2px solid var(--color-light-green);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Global Button Styles */
.btn,
.btn-secondary {
    padding: 12px 30px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn {
    background: var(--color-olive);
    color: white;
    border: none;
    box-shadow: 0 5px 15px rgba(137, 152, 109, 0.3);
}

.btn:hover {
    background-color: var(--color-sage);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--color-olive);
    border: 2px solid var(--color-olive);
}

.btn-secondary:hover {
    background: var(--color-light-green);
}

/* Header Controls */
.header-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.btn-small {
    background: transparent;
    border: 1px solid var(--color-olive);
    color: var(--color-olive);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-small:hover {
    background: var(--color-light-green);
    transform: translateY(-1px);
}

.btn-share {
    background-color: var(--color-olive);
    color: white;
    border: none;
}

.btn-share:hover {
    background-color: var(--color-sage);
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--color-olive);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Fade in/out */
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* Game Layout - Keep existing mostly */
.main-container {
    display: flex;
    gap: 40px;
    padding: 30px;
    max-width: 1400px;
    width: 95%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid #eee;
}

/* Crossword Section - groups grid and solution button */
.crossword-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.crossword-board-container {
    overflow: auto;
    display: flex;
    /* Removed centering to prevent clipping */
    padding: 30px;
    background: var(--grid-container-bg);
    border-radius: 12px;
    border: 1px solid var(--color-sage);
}

#crossword-grid {
    display: grid;
    gap: 0;
    padding: 20px;
    background: transparent;
    margin: auto;
    /* Smart centering */
}

.cell {
    width: 32px;
    height: 32px;
    background-color: transparent;
    position: relative;
    box-sizing: border-box;
}

.cell.active {
    background-color: var(--grid-bg);
    cursor: pointer;
    border: 1px solid var(--color-sage);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.input-ghost {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-color);
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    padding: 0;
    margin: 0;
    padding-bottom: 2px;
}

/* Incorrect letter styling - red color */
.input-ghost.incorrect {
    color: #e74c3c;
    font-weight: 800;
}

.cell.active:hover {
    background-color: #fcfcfc;
    border-color: var(--primary-color);
}

.cell.selected {
    background-color: var(--selected-cell);
    border-color: var(--primary-color);
}

.cell.highlighted-word {
    background-color: var(--highlight-color);
}

.cell.correct {
    color: var(--correct-color);
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    line-height: 1;
    color: var(--color-olive);
    pointer-events: none;
    font-weight: 700;
}

.clues-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    max-height: 80vh;
}

.clues-box {
    background: #fff;
    border-radius: 8px;
    padding: 0 20px 20px 20px;
    height: 50%;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 2px solid var(--bg-color);
}

.clues-box h3 {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px 0;
    margin-top: 0;
    border-bottom: 3px solid var(--color-light-green);
    color: var(--color-olive);
    font-size: 1.1rem;
    z-index: 10;
    font-weight: 800;
}

.clue-item {
    margin-bottom: 10px;
    cursor: pointer;
    line-height: 1.6;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 0.95rem;
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.clue-item:hover {
    background-color: var(--bg-color);
}

.clue-item.active-clue {
    background-color: var(--color-light-green);
    border-left: 4px solid var(--color-olive);
    color: #1a260e;
}

.clue-item strong {
    color: var(--color-olive);
    margin-right: 8px;
    font-weight: 700;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(156, 171, 132, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: popIn 0.3s ease-out;
    border: 4px solid var(--color-light-green);
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal h2 {
    color: var(--color-olive);
    font-size: 2rem;
    margin: 0 0 15px 0;
}

.modal p {
    font-size: 1.1rem;
    color: #555;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-sage);
    border-radius: 4px;
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }

    .clues-container {
        max-height: none;
    }
}

/* Mobile Clue Popup - Hidden by default, only shows on mobile */
.mobile-clue-popup {
    display: none;
}

/* Mobile-specific styles - use max-height for landscape detection */
@media (max-width: 768px), (max-height: 500px) {
    /* Hide subtitle on mobile */
    p.subtitle {
        display: none !important;
    }

    /* Compact header */
    header {
        margin: 10px 0 8px 0;
    }

    h1 {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }

    .header-controls {
        margin-top: 6px;
        gap: 8px;
    }

    .btn-small {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    /* Hide desktop clues */
    .clues-container {
        display: none;
    }

    /* Optimize spacing for portrait */
    .main-container {
        padding: 4px;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .crossword-section {
        margin: 0;
        width: 100%;
    }

    .crossword-board-container {
        padding: 4px;
        width: 100%;
        box-sizing: border-box;
    }

    #crossword-grid {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Smaller cells for mobile portrait */
    .cell {
        width: clamp(18px, 5.5vw, 28px);
        height: clamp(18px, 5.5vw, 28px);
    }

    .input-ghost {
        font-size: clamp(10px, 3.5vw, 16px);
    }

    .cell-number {
        font-size: clamp(5px, 1.5vw, 7px);
        top: 0px;
        left: 1px;
    }

    /* Mobile Popup Styles */
    .mobile-clue-popup {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 3px solid var(--color-olive);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        z-index: 2000;
        max-height: 30vh;
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }

    .mobile-clue-popup.show {
        display: block;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-clue-popup-content {
        padding: 15px 20px 18px 20px;
        position: relative;
        background: linear-gradient(to bottom, var(--color-light-green) 0%, white 100%);
    }

    .close-popup {
        position: absolute;
        top: 12px;
        right: 15px;
        background: var(--color-sage);
        color: white;
        border: none;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-size: 1.1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        line-height: 1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .close-popup:active {
        background: var(--color-olive);
        transform: scale(0.95);
    }

    .popup-clue-number {
        font-weight: 800;
        font-size: 1.6rem;
        color: var(--color-olive);
        display: inline-block;
        line-height: 1;
        margin-right: 8px;
    }

    .popup-clue-direction {
        font-size: 0.75rem;
        color: var(--color-sage);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        display: inline-block;
        vertical-align: middle;
    }

    .popup-clue-text {
        font-size: 1rem;
        line-height: 1.6;
        color: var(--text-color);
        margin: 12px 0 0 0;
        padding-right: 35px;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-weight: 400;
        letter-spacing: -0.01em;
    }

    /* Optional zoom effect on selected cell */
    .cell.selected {
        transform: scale(1.25);
        z-index: 10;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    }

    /* Footer mobil */
    footer#credits {
        font-size: 0.6rem;
        padding: 0 8px;
        margin-top: 20px;
        margin-bottom: 10px;
        word-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Puzzle info mobil */
    .puzzle-info {
        gap: 8px;
        margin-bottom: 8px;
    }

    .badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .stats {
        font-size: 0.75rem;
    }
}

/* Landscape mobile - catch wider phones like iPhone 12 Pro */
@media (max-height: 500px) and (orientation: landscape) {
    h1 {
        font-size: 1.1rem;
        display: inline-block;
        margin: 0;
    }

    p.subtitle {
        display: none !important;
    }

    .header-controls {
        display: inline-block;
        margin: 0 0 0 10px;
    }

    .btn-small {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .main-container {
        padding: 8px;
        gap: 8px;
        width: 100%;
    }

    .crossword-board-container {
        padding: 8px;
        width: 100%;
    }

    #crossword-grid {
        max-width: 100%;
    }

    .mobile-clue-popup {
        max-height: 20vh;
    }

    .popup-clue-number {
        font-size: 1.2rem;
    }

    .popup-clue-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Landscape modal optimizasyonu - full width sheet */
    .modal {
        align-items: flex-start;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px 20px;
        border-radius: 0 0 15px 15px;
        max-height: 90vh;
    }

    .modal-content h2 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .modal-content p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .difficulty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .difficulty-card {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .diff-icon {
        font-size: 1.5rem;
        margin-bottom: 3px;
    }

    .difficulty-card h3 {
        font-size: 0.95rem;
        margin: 3px 0 2px 0;
    }

    .difficulty-card p {
        font-size: 0.8rem;
        margin: 2px 0;
    }

    .diff-detail {
        font-size: 0.65rem;
    }

    .btn-secondary {
        padding: 6px 14px;
        font-size: 0.8rem;
        margin-top: 8px;
        width: 100%;
        border-radius: 8px;
    }

    .wordbank-info {
        font-size: 0.7rem;
        margin-top: 8px;
        padding-top: 8px;
    }
}

/* V2.0 Specific Styles */

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--color-olive), var(--color-sage));
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(137, 152, 109, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 152, 109, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--color-sage);
    border: 2px solid var(--color-sage);
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: var(--color-sage);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    color: var(--color-olive);
    margin-top: 0;
    font-size: 1.8rem;
    text-align: center;
}

.modal-content p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Difficulty Grid */
.difficulty-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.difficulty-card {
    background: linear-gradient(to bottom, var(--color-light-green), white);
    border: 2px solid var(--color-sage);
    border-radius: 15px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.difficulty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(137, 152, 109, 0.3);
    border-color: var(--color-olive);
}

.difficulty-card:active {
    transform: translateY(-2px);
}

.diff-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.difficulty-card h3 {
    color: var(--color-olive);
    margin: 10px 0 5px 0;
    font-size: 1.3rem;
}

.difficulty-card p {
    color: var(--color-sage);
    font-weight: 600;
    margin: 5px 0;
    font-size: 0.95rem;
}

.diff-detail {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* Wordbank Info */
.wordbank-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #888;
    font-size: 0.85rem;
}

.wordbank-info strong {
    color: var(--color-olive);
    font-weight: 600;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--color-light-green);
    border-top: 4px solid var(--color-olive);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen p {
    color: var(--color-olive);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 10px 0 5px 0;
}

.loading-screen small {
    color: var(--color-sage);
    font-size: 0.9rem;
}

/* Puzzle Info */
.puzzle-info {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    justify-content: center;
}

.badge {
    background: var(--color-olive);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats {
    color: var(--color-sage);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Mobile Responsive for V2 */
@media (max-width: 768px), (max-height: 500px) {
    /* Mobilde modal'ı tamamen gizle */
    .modal {
        display: none !important;
    }
    
    /* Desktop butonunu gizle, mobil select'i göster */
    .desktop-only {
        display: none !important;
    }
    
    /* Yeni Bulmaca butonundan sonra select menü görünsün */
    .mobile-difficulty-select {
        display: block !important;
        width: 100%;
        max-width: 100%;
        padding: 12px 15px;
        font-size: 1rem;
        font-family: 'Raleway', sans-serif;
        font-weight: 600;
        color: var(--color-olive);
        background: white;
        border: 2px solid var(--color-sage);
        border-radius: 10px;
        margin-top: 10px;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2389986d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        padding-right: 40px;
    }
    
    .mobile-difficulty-select:focus {
        outline: none;
        border-color: var(--color-olive);
        box-shadow: 0 0 0 3px rgba(137, 152, 109, 0.1);
    }
    
    /* Kelime bankası bilgisi - mobil */
    .mobile-wordbank-info {
        display: block !important;
        text-align: center;
        font-size: 0.75rem;
        color: #888;
        margin-top: 8px;
    }
    
    .mobile-wordbank-info strong {
        color: var(--color-olive);
        font-weight: 600;
    }
}

/* Solution Button Container */
.solution-button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

.btn-solution {
    font-size: 1rem;
    padding: 10px 25px;
}

/* Footer Credits */
footer#credits {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 0.75rem;
    /* Smaller font */
    color: var(--color-sage);
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    /* Slightly lighter weight */
    opacity: 0.7;
    /* Faded effect */
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
}

/* Saved Puzzle Cards */
.saved-puzzle-card {
    background: #fff;
    border: 2px solid var(--color-light-green);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.saved-puzzle-card:hover {
    border-color: var(--color-sage);
    box-shadow: 0 4px 12px rgba(137, 152, 109, 0.15);
    transform: translateY(-2px);
}