:root {
    /* Light Mode Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-inverse: #ffffff;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    
    /* Game Colors */
    --tile-bg: #ffffff;
    --tile-border: #d3d6da;
    --tile-filled: #878a8c;
    --correct: #6aaa64;
    --present: #c9b458;
    --absent: #787c7e;
    
    /* Accent Colors */
    --accent-primary: #5865f2;
    --accent-secondary: #7289da;
    --accent-hover: #4752c4;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #1a1d29;
    --bg-secondary: #25293a;
    --bg-tertiary: #2f3446;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-inverse: #1a1d29;
    --border-color: #3a3f52;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    
    /* Game Colors - Darker */
    --tile-bg: #25293a;
    --tile-border: #3a3f52;
    --tile-filled: #565a6e;
    --correct: #538d4e;
    --present: #b59f3b;
    --absent: #3a3a3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: var(--transition);
}

.container {
    max-width: 600px;
    width: 100%;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

.timer-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    opacity: 0.8;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.settings-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: var(--transition);
    color: var(--text-primary);
    touch-action: manipulation;
    user-select: none;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.icon-btn:active {
    transform: scale(0.95);
}

.theme-icon {
    transition: var(--transition);
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.language-select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.language-select:hover {
    background: var(--bg-tertiary);
}

.language-select:focus {
    border-color: var(--accent-primary);
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    animation: fadeInDown 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 8vw, 56px);
    height: clamp(40px, 8vw, 56px);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    color: white;
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 2rem);
    box-shadow: 0 4px 12px var(--shadow);
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Game Container */
.game-container {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 40px);
    box-shadow: 0 4px 20px var(--shadow);
    animation: fadeIn 0.8s ease;
}

.message {
    text-align: center;
    min-height: 32px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
    transition: var(--transition);
    border-radius: 8px;
    padding: 8px;
}

.message.error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.message.success {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.message.success::before {
    content: '✓';
    display: inline-block;
    margin-right: 8px;
    font-weight: 900;
    font-size: 1.2em;
}

.message.error::before {
    content: '✕';
    display: inline-block;
    margin-right: 8px;
    font-weight: 900;
    font-size: 1.2em;
}

/* Board */
.board {
    display: grid;
    gap: 6px;
    margin: 0 auto 30px;
    max-width: 350px;
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.tile {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--tile-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    transition: var(--transition);
    background: var(--tile-bg);
    color: var(--text-primary);
}

.tile.filled {
    border-color: var(--tile-filled);
    animation: pop 0.1s ease;
}

.tile.correct {
    background: var(--correct);
    border-color: var(--correct);
    color: var(--text-inverse);
    animation: flip 0.5s ease;
}

.tile.present {
    background: var(--present);
    border-color: var(--present);
    color: var(--text-inverse);
    animation: flip 0.5s ease;
}

.tile.absent {
    background: var(--absent);
    border-color: var(--absent);
    color: var(--text-inverse);
    animation: flip 0.5s ease;
}

/* Keyboard */
.keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.keyboard-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.key {
    padding: clamp(12px, 2vw, 16px);
    min-width: clamp(28px, 5vw, 44px);
    border: none;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: clamp(0.75rem, 2vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    user-select: none;
    touch-action: manipulation;
}

.key:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.key:active {
    transform: scale(0.95);
}

.key.wide {
    padding: clamp(12px, 2vw, 16px) clamp(15px, 3vw, 25px);
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
}

.key.correct {
    background: var(--correct);
    color: var(--text-inverse);
}

.key.present {
    background: var(--present);
    color: var(--text-inverse);
}

.key.absent {
    background: var(--absent);
    color: var(--text-inverse);
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    min-width: 140px;
    justify-content: center;
    touch-action: manipulation;
    user-select: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.btn-secondary {
    background: var(--accent-secondary);
}

.btn-secondary:hover {
    background: #5f73bc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-secondary);
    margin: 5% auto;
    padding: clamp(25px, 5vw, 40px);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px var(--shadow-lg);
    animation: slideIn 0.3s ease;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: clamp(15px, 3vw, 25px);
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.stat-value {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-primary);
}

.stat-label {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.share-modal.active {
    display: flex;
}

.share-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.share-stats {
    font-size: 1.1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
}

.share-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-buttons svg {
    flex-shrink: 0;
}

.share-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.05);
}

.share-btn-primary {
    background: #6aaa64;
    color: white;
}

.share-btn-secondary {
    background: var(--tile-border);
    color: var(--text-primary);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.footer-legal {
    margin-top: 10px;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
}

.footer-separator {
    margin: 0 10px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: #5865f2;
}

footer a:hover {
    color: var(--accent-primary) !important;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes flip {
    0% {
        transform: rotateX(0);
    }
    50% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0);
    }
}

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

/* Mobile Optimizations */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 0;
    }
    
    header {
        margin-bottom: 20px;
    }
    
    .header-top {
        margin-bottom: 15px;
    }
    
    .game-container {
        padding: 20px 15px;
    }
    
    .board {
        max-width: 300px;
        gap: 4px;
    }
    
    .row {
        gap: 4px;
    }
    
    .tile {
        font-size: 1.4rem;
        border-width: 1.5px;
    }
    
    .keyboard-row {
        gap: 3px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .stats-grid {
        gap: 10px;
    }
}

@media (max-width: 380px) {
    .tile {
        font-size: 1.2rem;
    }
    
    .key {
        min-width: 24px;
        padding: 10px;
        font-size: 0.7rem;
    }
    
    .key.wide {
        padding: 10px 12px;
        font-size: 0.65rem;
    }
}

/* Landscape mode for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .board {
        margin-bottom: 15px;
    }
    
    .keyboard {
        margin-bottom: 10px;
    }
}

/* Print styles */
@media print {
    .header-top,
    .controls,
    .keyboard,
    footer {
        display: none;
    }
}

/* ========================================
   SEO SECTIONS - Header & Content
   ======================================== */
.seo-header {
    max-width: 900px;
    margin: 2rem auto 2rem;
    padding: 2.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    text-align: center;
    border: 2px solid var(--border-color);
}

.seo-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.seo-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0;
}

.seo-intro strong {
    color: var(--text-primary);
    font-weight: 600;
}

.seo-content {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.seo-toggle {
    width: 100%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.seo-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.seo-toggle-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
}

.seo-toggle .toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-primary);
    flex-shrink: 0;
}

.seo-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.seo-sections {
    max-height: 5000px;
    opacity: 1;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.seo-sections.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.seo-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 2px solid var(--border-color);
}

.seo-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.seo-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.seo-section p:last-child {
    margin-bottom: 0;
}

.seo-section strong {
    color: var(--accent-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .seo-header {
        margin: 1.5rem 1rem;
        padding: 1.5rem;
    }
    
    .seo-header h1 {
        font-size: 1.75rem;
    }
    
    .seo-intro {
        font-size: 1rem;
    }
    
    .seo-content {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    .seo-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .seo-section h2 {
        font-size: 1.5rem;
    }
    
    .seo-section p {
        font-size: 0.95rem;
    }
}

/* ========================================
   SEO & How to Play Section - COLLAPSIBLE
   ======================================== */
.how-to-play {
    max-width: 900px;
    margin: 3rem auto 2rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
}

.how-to-play-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.how-to-play-toggle:hover {
    background: var(--bg-tertiary);
}

.how-to-play-toggle .section-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-primary);
}

.how-to-play-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.how-to-play .instructions {
    max-height: 500px;
    opacity: 1;
    padding: 0 24px 24px;
    transition: all 0.3s ease;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.how-to-play .instructions.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 24px;
}

.instruction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.instruction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.instruction-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.instruction-item p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* About Modal Styles */
.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-content {
    text-align: left;
    line-height: 1.8;
}

.about-content p {
    margin: 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.about-content strong {
    color: var(--correct-bg);
    font-weight: 600;
}

.about-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.about-list li {
    padding: 0.875rem 0;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.about-list li:last-child {
    border-bottom: none;
}

.about-list strong {
    color: var(--correct-bg);
}

@media (max-width: 768px) {
    .how-to-play {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
    
    .instructions {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .instruction-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .instruction-item p {
        font-size: 0.9rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .about-content h3 {
        font-size: 1.125rem;
    }
}

/* ========================================
   WIN MODAL STYLES
   ======================================== */
.win-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

.win-modal-overlay.closing {
    animation: fadeOut 0.3s ease;
}

.win-modal {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.win-header {
    margin-bottom: 30px;
}

.win-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.win-icon svg {
    color: white;
    stroke: white;
}

.win-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.win-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.win-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

.win-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.win-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.win-stat .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.win-word {
    margin: 25px 0 30px 0;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 15px;
    text-align: center;
}

.win-word-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.win-word-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin: 0;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.win-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.win-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    touch-action: manipulation;
    user-select: none;
}

.win-btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.win-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}

.win-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.win-btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

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

/* ========================================
   SHARE MODAL OVERLAY STYLES
   ======================================== */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    animation: fadeIn 0.3s ease;
}

.share-modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 35px 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.close-share-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-share-modal:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.share-modal-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    margin-top: 0;
}

.share-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-option {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    touch-action: manipulation;
    user-select: none;
}

.share-option:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.share-option:active {
    transform: translateY(0);
}

.share-option svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========================================
   ANIMATIONS (zusätzliche)
   ======================================== */
@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0) rotateZ(-45deg);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1) rotateZ(0);
    }
}

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

/* ========================================
   FAIL MODAL STYLES
   ======================================== */
.fail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

.fail-modal-overlay.closing {
    animation: fadeOut 0.3s ease;
}

.fail-modal {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fail-header {
    margin-bottom: 30px;
}

.fail-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.fail-icon svg {
    color: white;
    stroke: white;
}

.fail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.fail-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.fail-word {
    margin: 30px 0 30px 0;
    padding: 18px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 15px;
    text-align: center;
}

.fail-word-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fail-word-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin: 0;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fail-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    touch-action: manipulation;
    user-select: none;
}

.fail-btn-primary {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.fail-btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

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

/* Mobile responsiveness for modals */
@media (max-width: 480px) {
    .win-modal {
        padding: 30px 20px;
    }
    
    .win-icon {
        width: 60px;
        height: 60px;
    }
    
    .win-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .win-title {
        font-size: 2rem;
    }
    
    .win-text {
        font-size: 1rem;
    }
    
    .win-stats {
        gap: 10px;
        padding: 15px;
    }
    
    .win-stat .stat-value {
        font-size: 1.6rem;
    }
    
    .win-word-value {
        font-size: 1.8rem;
    }
    
    .win-word {
        margin: 20px 0 25px 0;
        padding: 15px;
    }
    
    .win-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .share-modal-content {
        padding: 25px 20px;
    }
    
    .share-modal-content h3 {
        font-size: 1.5rem;
    }
    
    .share-option {
        padding: 12px 14px;
        font-size: 0.95rem;
        gap: 10px;
    }
    
    .fail-modal {
        padding: 30px 20px;
    }
    
    .fail-icon {
        width: 60px;
        height: 60px;
    }
    
    .fail-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .fail-title {
        font-size: 2rem;
    }
    
    .fail-text {
        font-size: 1rem;
    }
    
    .fail-word-value {
        font-size: 1.8rem;
    }
    
    .fail-word {
        margin: 20px 0 25px 0;
        padding: 15px;
    }
    
    .fail-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}
