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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    min-height: 80vh;
}

.screen.active {
    display: block;
}

/* Специальные правила для разных экранов */
#admin-screen.active {
    display: flex;
    flex-direction: column;
}

#player-screen.active,
#stream-screen.active,
#main-screen.active {
    display: block;
}

/* Главный экран */
.game-title {
    text-align: center;
    font-size: 3rem;
    color: #4a5568;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.main-menu {
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 20px;
}

.big-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.big-input:focus {
    outline: none;
    border-color: #667eea;
}

.big-button {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.big-button:hover {
    transform: translateY(-2px);
}

.big-button:active {
    transform: translateY(0);
}

.create-button {
    background: #4299e1;
    margin-top: 20px;
}

.error-message {
    color: #f56565;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    background: #fff5f5;
    display: none;
}

/* Обновленные стили для административной панели */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.game-id-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a5568;
}

.copy-button {
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-button:hover {
    background: #cbd5e0;
    transform: scale(1.05);
}

.copy-button.copied {
    background: #48bb78;
    color: white;
}

.copy-button.copied::after {
    content: 'Скопировано!';
    font-size: 0.8rem;
    margin-left: 5px;
}

.start-button {
    padding: 12px 30px;
    font-size: 1.2rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.start-button:hover {
    background: #38a169;
    transform: scale(1.05);
}

.start-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.end-button {
    padding: 12px 30px;
    font-size: 1.2rem;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.end-button:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

/* Компактные настройки в одну строку */
.settings-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    font-weight: 500;
    white-space: nowrap;
}

.setting-item input[type="number"] {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 0.95rem;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 5px;
    cursor: pointer;
}

#final-questions-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Основной контейнер для игроков и команд */
.game-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-top: 10px;
}

/* Список игроков */
.players-column {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: fit-content;
    max-height: 600px;
    overflow-y: auto;
}

.players-column h3 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.players-list {
    min-height: 200px;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: white;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: move;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.player-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.player-item.admin {
    border-left: 4px solid #fbbf24;
    background: #fffbeb;
}

.player-item.stream {
    border-left: 4px solid #9f7aea;
    background: #faf5ff;
}

.player-nickname {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.player-role {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #4a5568;
}

.no-players {
    text-align: center;
    color: #a0aec0;
    padding: 20px;
    font-style: italic;
}

/* Блок команд */
.teams-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.teams-section h3 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-team {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.create-team input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.create-team input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.create-team button {
    padding: 10px 20px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.create-team button:hover {
    background: #3182ce;
}

/* Горизонтальный контейнер для команд */
.teams-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 15px 5px;
    min-height: 380px;
    scrollbar-width: thin;
    scrollbar-color: #a0aec0 #e2e8f0;
}

.teams-container::-webkit-scrollbar {
    height: 8px;
}

.teams-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.teams-container::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 4px;
}

.teams-container::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Карточка команды */
.team-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    min-width: 280px;
    max-width: 300px;
    flex-shrink: 0;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.team-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2d3748;
}

.delete-team {
    padding: 4px 8px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s;
}

.delete-team:hover {
    background: #e53e3e;
}

.team-players {
    min-height: 80px;
    max-height: 120px;
    overflow-y: auto;
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.team-player {
    display: inline-block;
    padding: 4px 10px;
    background: #4299e1;
    color: white;
    border-radius: 16px;
    font-size: 0.85rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.team-player:hover {
    background: #3182ce;
}

.team-questions {
    margin-top: 8px;
    flex-grow: 1;
}

.team-questions textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
    font-size: 0.85rem;
}

.team-questions textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.save-questions {
    margin-top: 8px;
    padding: 6px 12px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    width: 100%;
}

.save-questions:hover {
    background: #38a169;
}

.team-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 0;
    font-size: 0.9rem;
    color: #718096;
}

.players-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #e2e8f0;
    border-radius: 16px;
    font-weight: 500;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #fbbf24;
    color: #000;
    border-radius: 16px;
    font-weight: bold;
}

.team-card.team-warning {
    border: 2px solid #f56565;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.2);
    animation: warning-pulse 1.5s infinite;
}

.team-card.team-warning .players-count {
    background: #fed7d7;
    color: #c53030;
    font-weight: bold;
}

/* Панель статуса игры */
.game-status-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.game-status-info {
    text-align: center;
}

.status-round {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.status-team {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.status-player {
    font-size: 1.2rem;
    opacity: 0.9;
}

.status-answers {
    font-size: 1.5rem;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.status-final {
    font-size: 2rem;
    font-weight: bold;
    animation: pulse 1s infinite;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.status-note {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ecc94b;
    background: rgba(236, 201, 75, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.answers-preview {
    background: white;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.answers-preview h4 {
    margin-bottom: 10px;
    color: #2d3748;
}

.answers-preview div {
    padding: 5px 0;
    border-bottom: 1px solid #e2e8f0;
}

.correct-answer-preview {
    margin-top: 10px;
    padding: 10px;
    background: #c6f6d5;
    border-radius: 5px;
    font-weight: bold;
    color: #22543d;
}

.admin-decision-panel {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.admin-decision-panel .accept-button,
.admin-decision-panel .reject-button {
    flex: 1;
    padding: 12px;
    font-size: 1.1rem;
}

/* Экран игрока */
.game-status {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

#game-status-message,
#admin-status-message {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 15px;
}

.timer,
#admin-timer-display {
    font-size: 4rem;
    font-weight: bold;
    color: #f56565;
    font-family: monospace;
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #fff5f5;
    border-radius: 10px;
    border: 2px solid #feb2b2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}

.timer.warning,
#admin-timer-display.warning {
    color: #e53e3e;
    animation: pulse 0.5s infinite;
    background: #fed7d7;
}

.game-content,
#admin-game-content {
    max-width: 600px;
    margin: 0 auto;
}

.question-display {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.start-question-button {
    padding: 20px 40px;
    font-size: 1.5rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.start-question-button:hover {
    background: #38a169;
    transform: scale(1.02);
}

.answer-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.3s;
}

.answer-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.ready-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.ready-button:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

.ready-button:active {
    transform: translateY(0);
}

.waiting {
    text-align: center;
    font-size: 1.2rem;
    color: #718096;
    padding: 40px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

/* Экран stream */
.stream-container {
    padding: 20px;
}

.stream-status {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    color: #4a5568;
    font-weight: bold;
}

.stream-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stream-question {
    font-size: 1.2rem;
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
    text-align: left;
}

.stream-answers {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.stream-answer-item {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.stream-answer-item:last-child {
    border-bottom: none;
}

.stream-correct-answer {
    margin-top: 20px;
    padding: 15px;
    background: #c6f6d5;
    border-radius: 5px;
    font-weight: bold;
    color: #22543d;
}

.stream-results {
    background: white;
    padding: 30px;
    border-radius: 10px;
}

.stream-team-result {
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 15px;
}

.stream-team-result h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

/* Результаты игры */
.results-container {
    text-align: center;
    padding: 20px;
}

.team-result {
    background: #f7fafc;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.team-result.winner {
    background: #c6f6d5;
    border: 2px solid #48bb78;
}

.team-score {
    font-size: 2rem;
    font-weight: bold;
    color: #4a5568;
}

.final-status {
    font-size: 1.2rem;
    margin-top: 10px;
}

.final-status.success {
    color: #48bb78;
}

.final-status.failure {
    color: #f56565;
}

/* Ответы */
.answers-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.answer-item {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.1rem;
}

.answer-item:last-child {
    border-bottom: none;
}

.correct-answer {
    margin-top: 20px;
    padding: 15px;
    background: #c6f6d5;
    border-radius: 5px;
    font-weight: bold;
    color: #22543d;
}

.admin-decision {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.accept-button {
    padding: 15px 40px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s;
    flex: 1;
}

.accept-button:hover {
    background: #38a169;
    transform: scale(1.02);
}

.reject-button {
    padding: 15px 40px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s;
    flex: 1;
}

.reject-button:hover {
    background: #e53e3e;
    transform: scale(1.02);
}

/* Сообщения */
.reconnect-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fbbf24;
    color: #000;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    font-weight: bold;
    animation: slideDown 0.3s ease-out;
}

.temporary-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.temporary-message.success {
    background: #48bb78;
}

.temporary-message.error {
    background: #f56565;
}

.temporary-message.info {
    background: #4299e1;
}

/* Стили для финала */
.final-container {
    text-align: center;
    padding: 20px;
}

.final-title {
    font-size: 2.5rem;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    margin-bottom: 30px;
    animation: pulse 1s infinite;
}

.final-waiting {
    font-size: 1.5rem;
    color: #4a5568;
    margin: 30px 0;
    padding: 30px;
    background: #f7fafc;
    border-radius: 10px;
}

.final-teams-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

.final-team-item {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.final-team-item.completed {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.final-team-item.failed {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.final-current-status {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1.2rem;
}

.final-waiting-status {
    margin-top: 10px;
    font-size: 1rem;
    color: #ecc94b;
    font-style: italic;
}

.final-ready-container {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    margin: 20px 0;
}

.final-ready-message {
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: bold;
}

.final-ready-button {
    padding: 20px 60px;
    font-size: 2rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse 1.5s infinite;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.final-ready-button:hover {
    background: #38a169;
    transform: scale(1.1);
}

.final-question-container {
    text-align: center;
    padding: 20px;
}

.final-question-header {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 20px;
}

.final-question {
    font-size: 2rem;
    color: #2d3748;
    margin: 30px 0;
    padding: 30px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
    text-align: left;
}

.final-question-note {
    margin-top: 20px;
    padding: 15px;
    background: #ebf8ff;
    border-radius: 8px;
    color: #2b6cb0;
    font-size: 1.1rem;
    border-left: 4px solid #4299e1;
}

.final-guess-button {
    padding: 20px 40px;
    font-size: 1.5rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse 1.5s infinite;
    margin-top: 20px;
}

.final-guess-button:hover {
    background: #38a169;
    transform: scale(1.05);
}

.final-guess-button-placeholder {
    margin: 20px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    color: #718096;
    font-style: italic;
}

.final-waiting-container {
    text-align: center;
    padding: 40px;
}

.final-waiting-message {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 20px;
}

.final-time {
    font-size: 2rem;
    font-weight: bold;
    color: #f56565;
    font-family: monospace;
}

.final-success-message {
    text-align: center;
    padding: 40px;
}

.final-success-message h3 {
    color: #48bb78;
    font-size: 2rem;
    margin-bottom: 20px;
}

.final-success-message p {
    font-size: 1.2rem;
    color: #4a5568;
}

.final-completed {
    text-align: center;
    padding: 40px;
}

.final-completed.success h3 {
    color: #48bb78;
    font-size: 2rem;
    margin-bottom: 20px;
}

.final-completed.failure h3 {
    color: #f56565;
    font-size: 2rem;
    margin-bottom: 20px;
}

.final-completed p {
    font-size: 1.5rem;
    color: #4a5568;
}

/* Админские стили для финала */
.final-admin-panel {
    text-align: center;
}

.final-timer {
    font-size: 2rem;
    font-weight: bold;
    color: #f56565;
    font-family: monospace;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 5px;
}

.final-timer.warning {
    color: #e53e3e;
    animation: pulse 0.5s infinite;
    background: rgba(229, 62, 62, 0.2);
    border-radius: 5px;
    padding: 10px;
}

.final-completed-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.final-completed-message.success {
    background: #c6f6d5;
    color: #22543d;
}

.final-completed-message.failure {
    background: #fed7d7;
    color: #742a2a;
}

.final-results-panel {
    text-align: center;
}

.final-result-item {
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    background: white;
    color: #333;
}

.final-result-item.success {
    border-left: 4px solid #48bb78;
}

.final-result-item.failure {
    border-left: 4px solid #f56565;
}

.final-team-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3748;
}

.final-team-score {
    font-size: 1rem;
    color: #718096;
    margin: 5px 0;
}

.final-team-status {
    font-size: 1rem;
    font-weight: bold;
}

.final-team-status.success {
    color: #48bb78;
}

.final-team-status.failure {
    color: #f56565;
}

/* Стили для стрима в финале */
.stream-final-container {
    text-align: center;
    padding: 20px;
}

.stream-final-title {
    font-size: 2rem;
    color: #fbbf24;
    margin-bottom: 20px;
}

.stream-teams-list {
    margin: 20px 0;
}

.stream-teams-list div {
    padding: 10px;
    background: #f7fafc;
    margin: 5px 0;
    border-radius: 5px;
}

.stream-final-question {
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.stream-final-waiting {
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.stream-final-completed {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.stream-final-completed.success {
    background: #c6f6d5;
    color: #22543d;
}

.stream-final-completed.failure {
    background: #fed7d7;
    color: #742a2a;
}

/* Контейнер для игрового интерфейса админа */
#admin-player-content {
    flex: 1;
    display: none;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Заголовок и статус в игровом режиме */
#admin-player-content .game-status {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#admin-player-content #admin-status-message {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Таймер */
#admin-player-content #admin-timer-display {
    font-size: 4rem;
    font-weight: bold;
    color: #f56565;
    font-family: monospace;
    text-align: center;
    margin: 20px auto;
    padding: 20px;
    background: #fff5f5;
    border-radius: 10px;
    border: 2px solid #feb2b2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    max-width: 400px;
}

#admin-player-content #admin-timer-display.warning {
    color: #e53e3e;
    animation: pulse 0.5s infinite;
    background: #fed7d7;
}

/* Контейнер для контента */
#admin-player-content .game-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Ожидание */
#admin-player-content .waiting {
    text-align: center;
    font-size: 1.2rem;
    color: #718096;
    padding: 40px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

/* Вопрос */
#admin-player-content .question-display {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: 150px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
}

/* Кнопка начала вопроса */
#admin-player-content .start-question-button {
    padding: 20px 40px;
    font-size: 1.5rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

#admin-player-content .start-question-button:hover {
    background: #38a169;
    transform: scale(1.02);
}

/* Контейнер для ответа */
#admin-player-content .answer-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#admin-player-content .answer-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.3s;
}

#admin-player-content .answer-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

#admin-player-content .ready-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

#admin-player-content .ready-button:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

/* Кнопки зачет/незачет */
#admin-player-content .admin-decision {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

#admin-player-content .accept-button,
#admin-player-content .reject-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
}

#admin-player-content .accept-button {
    background: #48bb78;
    color: white;
}

#admin-player-content .accept-button:hover {
    background: #38a169;
    transform: scale(1.02);
}

#admin-player-content .reject-button {
    background: #f56565;
    color: white;
}

#admin-player-content .reject-button:hover {
    background: #e53e3e;
    transform: scale(1.02);
}

/* Ответы команды */
#admin-player-content .answers-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

#admin-player-content .answer-item {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.1rem;
}

#admin-player-content .answer-item:last-child {
    border-bottom: none;
}

#admin-player-content .correct-answer {
    margin-top: 20px;
    padding: 15px;
    background: #c6f6d5;
    border-radius: 5px;
    font-weight: bold;
    color: #22543d;
}

/* Результаты игры */
#admin-player-content .results-container {
    text-align: center;
    padding: 20px;
}

#admin-player-content .team-result {
    background: #f7fafc;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

#admin-player-content .team-result.winner {
    background: #c6f6d5;
    border: 2px solid #48bb78;
}

#admin-player-content .team-score {
    font-size: 2rem;
    font-weight: bold;
    color: #4a5568;
}

#admin-player-content .final-status {
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes warning-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 101, 101, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(245, 101, 101, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 101, 101, 0);
    }
}

@keyframes slideDown {
    from {
        top: -100px;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        right: -100px;
        opacity: 0;
    }
    to {
        right: 20px;
        opacity: 1;
    }
}

.highlight {
    background: #fef3c7;
    transition: background 0.3s;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }
    
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .setting-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .setting-item input[type="number"] {
        width: 80px;
    }
    
    .create-team {
        flex-direction: column;
    }
    
    .create-team button {
        width: 100%;
    }
    
    .teams-container {
        padding: 10px 0;
    }
    
    .team-card {
        min-width: 260px;
    }
    
    .players-column {
        max-height: 300px;
    }
    
    .timer,
    #admin-timer-display {
        font-size: 3rem;
    }
    
    .question-display {
        font-size: 1.2rem;
        padding: 20px;
    }
    
    .final-question {
        font-size: 1.5rem;
        padding: 20px;
    }
    
    .admin-decision {
        flex-direction: column;
    }
    
    .accept-button,
    .reject-button {
        width: 100%;
    }
    
    .stream-status {
        font-size: 1.5rem;
    }
    
    .status-team {
        font-size: 1.2rem;
    }
    
    .status-player {
        font-size: 1rem;
    }
    
    .status-final {
        font-size: 1.5rem;
    }
    
    .final-title {
        font-size: 2rem;
    }
    
    .final-ready-message {
        font-size: 1.5rem;
    }
    
    .final-ready-button {
        padding: 15px 40px;
        font-size: 1.5rem;
    }
    
    .final-guess-button {
        padding: 15px 30px;
        font-size: 1.2rem;
    }
    
    .game-id-display {
        font-size: 1.2rem;
        flex-wrap: wrap;
    }
    
    .copy-button {
        font-size: 1rem;
        padding: 4px 8px;
    }
    
    .copy-button.copied::after {
        font-size: 0.7rem;
    }
    
    /* Адаптация для админского игрового интерфейса */
    #admin-player-content {
        padding: 15px;
    }
    
    #admin-player-content .game-status {
        padding: 15px;
    }
    
    #admin-player-content #admin-status-message {
        font-size: 1.2rem;
    }
    
    #admin-player-content #admin-timer-display {
        font-size: 3rem;
        padding: 15px;
    }
    
    #admin-player-content .question-display {
        font-size: 1.2rem;
        padding: 20px;
    }
    
    #admin-player-content .admin-decision {
        flex-direction: column;
        gap: 10px;
    }
    
    #admin-player-content .accept-button,
    #admin-player-content .reject-button {
        width: 100%;
        padding: 12px 20px;
    }
    
    #admin-player-content .start-question-button {
        padding: 15px 30px;
        font-size: 1.2rem;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .game-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .start-button,
    .end-button {
        width: 100%;
    }
    
    .team-card {
        min-width: 240px;
    }
}

.reconnect-message::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: -1;
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.delete-button {
    background: #f56565;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.delete-button:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

.delete-button:active {
    transform: scale(0.95);
}

/* Для мобильных */
@media (max-width: 768px) {
    .delete-button {
        font-size: 1rem;
        padding: 4px 8px;
    }
}