/* ===== MOBILE-FIRST HANGMAN STYLES ===== */

.game-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

/* Header */
.game-header {
    margin-bottom: 15px;
}

.game-header h1 {
    font-size: 1.6rem;
    margin: 0 0 5px 0;
    color: #333;
}

.game-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    border: 1px solid #dee2e6;
    min-width: 60px;
    justify-content: center;
}

.stat-item.wins {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.stat-icon {
    font-size: 1.1rem;
}

.stat-value {
    font-weight: bold;
    color: #333;
}

/* Game Board */
.game-board {
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
}

/* Hangman Area */
.hangman-area {
    margin-bottom: 15px;
}

.hangman-area canvas {
    width: 140px;
    height: 175px;
    max-width: 100%;
}

/* Word Section */
.word-section {
    margin-top: 10px;
}

.word-display {
    font-size: 2rem;
    letter-spacing: 8px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

.message {
    font-size: 1.1rem;
    color: #666;
    min-height: 30px;
}

/* Hint Section */
.hint-section {
    margin-bottom: 15px;
}

.btn-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #FFD93D, #F6AD55);
    color: #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255, 217, 61, 0.3);
}

.btn-hint:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 217, 61, 0.4);
}

.btn-hint:active {
    transform: scale(0.98);
}

.hint-image-container {
    margin-top: 10px;
}

.hint-image-container img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border: 3px solid #fff;
}

/* Keyboard */
.keyboard-container {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 15px 10px;
    margin-bottom: 15px;
}

.arabic-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.key {
    width: 42px;
    height: 48px;
    font-size: 1.3rem;
    border: none;
    border-radius: 10px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 3px 0 #dee2e6, 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.key:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #dee2e6, 0 6px 15px rgba(0,0,0,0.15);
}

.key:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #dee2e6;
}

.key.used {
    background: #dee2e6;
    color: #adb5bd;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.key.used:hover {
    transform: none;
    box-shadow: none;
}

/* Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 100;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    z-index: 100;
}

.btn-primary:hover,
.btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-mute {
    background: #6c757d;
    color: white;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border-radius: 12px;
}

.btn-mute:hover {
    background: #5a6268;
}

/* Social Share */
.social-share {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.social-share h2 {
    font-size: 1rem;
    color: #666;
    margin: 0 0 12px 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.social-button:hover {
    transform: translateY(-3px) scale(1.1);
}

.social-button.facebook { background: #1877F2; }
.social-button.twitter { background: #000; }
.social-button.whatsapp { background: #25D366; }

/* Navigation */
.game-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
    flex: 1;
    max-width: 160px;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.nav-link.prev {
    border-right: 3px solid #6c757d;
}

.nav-link.next {
    border-left: 3px solid #4CAF50;
    flex-direction: row-reverse;
}

.nav-arrow {
    font-size: 1.2rem;
    color: #6c757d;
}

.nav-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.nav-link.next .nav-text {
    text-align: left;
}

.nav-label {
    font-size: 0.7rem;
    color: #6c757d;
}

.nav-game {
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
}

/* Paywall Modal */
.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.paywall-modal {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

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

.paywall-modal h2 {
    color: #9C27B0;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.paywall-modal .trophy {
    font-size: 3em;
    margin-bottom: 10px;
}

.paywall-modal p {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.messenger {
    background: linear-gradient(135deg, #0099FF, #5B5BFF);
    color: white;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.copy {
    background: #6c757d;
    color: white;
}

.share-btn.copied {
    background: #4CAF50 !important;
}

.skip-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.skip-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: underline;
}

.skip-btn:hover {
    color: #666;
}

.countdown-timer {
    color: #f5a623;
    font-weight: bold;
    font-size: 1.2em;
}

/* ===== TABLET STYLES (481px+) ===== */
@media (min-width: 481px) {
    .game-container {
        padding: 20px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .game-subtitle {
        font-size: 1rem;
    }

    .stats-bar {
        gap: 15px;
    }

    .stat-item {
        padding: 10px 20px;
        font-size: 1.1rem;
        min-width: 80px;
    }

    .hangman-area canvas {
        width: 180px;
        height: 225px;
    }

    .word-display {
        font-size: 2.5rem;
        letter-spacing: 12px;
    }

    .key {
        width: 50px;
        height: 55px;
        font-size: 1.5rem;
    }

    .btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .btn-mute {
        width: 55px;
        height: 55px;
    }

    .nav-link {
        padding: 15px 20px;
        max-width: 200px;
    }

    .nav-label {
        font-size: 0.8rem;
    }

    .nav-game {
        font-size: 1rem;
    }
}

/* ===== DESKTOP STYLES (769px+) ===== */
@media (min-width: 769px) {
    .game-container {
        max-width: 700px;
    }

    .game-board {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        padding: 25px;
    }

    .hangman-area {
        margin-bottom: 0;
    }

    .hangman-area canvas {
        width: 200px;
        height: 250px;
    }

    .word-section {
        text-align: center;
    }

    .key {
        width: 55px;
        height: 60px;
    }
}
