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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Ad Banner Styles */
.ad-banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-banner {
    width: 728px;
    height: 90px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 10px;
    color: #6c757d;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
}

.ad-icon {
    font-size: 24px;
    color: #007bff;
}

.ad-text h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.ad-text p {
    font-size: 12px;
    color: #666;
    margin: 2px 0;
}

.ad-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.ad-btn:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hide ad banner on mobile */
@media (max-width: 768px) {
    .ad-banner-container {
        display: none;
    }
}

.game-container {
    width: 800px;
    height: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.game-header {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    padding: 15px 20px;
    color: white;
    text-align: center;
}

.score-board {
    display: flex;
    justify-content: space-around;
    font-size: 18px;
    font-weight: bold;
}

.score-board > div {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.language-selector {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.keyboard-layout {
    margin-top: 15px;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.keyboard-layout.show {
    display: flex;
}

.keyboard-layout img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.keyboard-layout .keyboard-info {
    color: white;
    text-align: center;
    margin-left: 15px;
}

.keyboard-layout .keyboard-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #fff;
}

.keyboard-layout .keyboard-info p {
    font-size: 12px;
    margin: 2px 0;
    color: rgba(255, 255, 255, 0.9);
}

.keyboard-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.keyboard-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.keyboard-layout.collapsed img {
    display: none;
}

/* Game Controls Styles */
.game-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-group label {
    font-size: 12px;
    color: #fff;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.control-group input[type="range"] {
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.control-group input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.game-area {
    width: 100%;
    height: calc(100% - 70px);
    position: relative;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.falling-letter {
    position: absolute;
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    user-select: none;
    transition: all 0.1s ease;
    animation: glow 2s ease-in-out infinite alternate;
}

.falling-letter.correct {
    color: #27ae60;
    transform: scale(1.2);
    animation: correctHit 0.3s ease-out;
}

.falling-letter.wrong {
    color: #e74c3c;
    animation: wrongHit 0.3s ease-out;
}

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    to {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), 0 0 10px rgba(74, 144, 226, 0.5);
    }
}

@keyframes correctHit {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1.2); opacity: 0; }
}

@keyframes wrongHit {
    0% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.overlay-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.overlay-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overlay-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ecf0f1;
}

/* Pause specific styling */
.overlay-content.paused {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.overlay-content.paused h2 {
    color: #f39c12;
}

.btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

.game-overlay.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 850px) {
    .game-container {
        width: 95vw;
        height: 80vh;
    }
    
    .score-board {
        font-size: 16px;
    }
    
    .falling-letter {
        font-size: 28px;
    }
    
    .keyboard-layout {
        flex-direction: column;
        text-align: center;
    }
    
    .keyboard-layout img {
        max-height: 80px;
        margin-bottom: 10px;
    }
    
    .keyboard-layout .keyboard-info {
        margin-left: 0;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-group input[type="range"] {
        width: 100px;
    }
}

@media (max-width: 600px) {
    .score-board {
        flex-direction: column;
        gap: 5px;
    }
    
    .score-board > div {
        padding: 5px 10px;
    }
    
    .falling-letter {
        font-size: 24px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .control-group input[type="range"] {
        width: 80px;
    }
    
    .control-group label {
        font-size: 10px;
    }
} 