/* ===== ОБЩИЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: #fff;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* ===== ФОРМЫ ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.form-control {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== ЗАГОЛОВКИ ===== */
.page-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 30px;
}

/* ===== ЛОГО ===== */
.logo {
    font-size: 48px;
    text-align: center;
    margin-bottom: 20px;
}

/* ===== КОД КОМНАТЫ ===== */
.room-code {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 8px;
    color: #667eea;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

/* ===== СПИСОК ИГРОКОВ ===== */
.players-list {
    list-style: none;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
}

.player-name {
    flex: 1;
    font-weight: 500;
}

.player-score {
    font-weight: 700;
    color: #38ef7d;
}

.player-host {
    background: #ffd700;
    color: #000;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    margin-left: 10px;
}

/* ===== ИГРОВЫЕ КАРТОЧКИ ===== */
.game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.game-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.game-card.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.game-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.game-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.game-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.game-players {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
}

/* ===== СЛОВО ДЛЯ ПОКАЗА ===== */
.word-display {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.word-hidden {
    font-size: 32px;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== ТАЙМЕР ===== */
.timer {
    font-size: 64px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}

.timer.warning {
    color: #f39c12;
}

.timer.danger {
    color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== РАУНД ===== */
.round-info {
    text-align: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

/* ===== ПОЛЕ ВВОДА ОТВЕТА ===== */
.guess-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.guess-form .form-control {
    flex: 1;
}

.guess-form .btn {
    width: auto;
    padding: 15px 25px;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.notification.error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.notification.info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== ЭКРАН ЗАГРУЗКИ ===== */
.loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ЭКРАН ТВ ===== */
.tv-container {
    max-width: 100%;
    padding: 40px;
    min-height: 100vh;
}

.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.tv-logo {
    font-size: 36px;
    font-weight: 700;
}

.tv-room-code {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
}

.tv-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.tv-game-area {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
}

.tv-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 30px;
}

.tv-word {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 30px;
}

.tv-timer {
    font-size: 120px;
    font-weight: 700;
}

.tv-explainer {
    font-size: 24px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.tv-player-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 10px;
}

.tv-player-item.explainer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tv-player-score {
    font-size: 24px;
    font-weight: 700;
    margin-left: auto;
}

/* ===== РЕЗУЛЬТАТЫ ===== */
.results {
    text-align: center;
    padding: 40px;
}

.winner-crown {
    font-size: 80px;
    margin-bottom: 20px;
}

.winner-name {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.winner-score {
    font-size: 24px;
    color: #38ef7d;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .tv-main {
        grid-template-columns: 1fr;
    }
    
    .tv-word {
        font-size: 48px;
    }
    
    .tv-timer {
        font-size: 80px;
    }
    
    .container {
        padding: 15px;
    }
    
    .word-display {
        font-size: 28px;
        padding: 30px;
    }
}
