/* Gartic Show - дополнительные стили к quiz-style.css */

/* Скрыть плашку камеры во время игры */
.camera-label-overlay.hidden {
    display: none !important;
}

/* Ограничение высоты игрового экрана */
#game-screen {
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

#game-screen .game-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 120px);
}

/* Уменьшенный таймер для Gartic */
#game-screen .timer-container {
    padding: 10px 20px;
    flex-shrink: 0;
}

#game-screen .timer-bar-bg {
    height: 20px;
}

#game-screen .timer-number {
    font-size: 2rem;
}

#game-screen .timer-unit {
    font-size: 0.85rem;
}

#game-screen .timer-display {
    right: 15px;
}

/* Уменьшенный заголовок карточки */
#game-screen .card-header {
    padding: 12px 20px;
    flex-shrink: 0;
}

#game-screen .question-counter {
    font-size: 1.2rem;
}

/* Холст на весь размер с ограничением */
#game-screen .canvas-wrapper {
    padding: 0;
    margin: 0;
    background: #ffffff;
    border-radius: 0 0 8px 8px;
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

#game-screen #drawing-canvas {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
    display: block;
    cursor: crosshair;
}

#game-screen #drawing-canvas[style*="pointer-events: none"] {
    cursor: not-allowed;
    opacity: 0.5;
}

#game-screen .question-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Оверлеи внутри камеры */
.camera-frame-large {
    position: relative;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 1rem;
}

.camera-overlay.hidden {
    display: none !important;
}

/* Выбор слова внутри камеры */
.camera-overlay-content {
    width: 100%;
    text-align: center;
}

.camera-word-choice-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-yellow);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.camera-word-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.camera-word-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--neon-yellow);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 150px;
}

.camera-word-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--neon-yellow);
    transform: none;
    box-shadow: none;
}

.camera-word-input {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--neon-yellow);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem 0;
}

.camera-word-submit {
    background: var(--neon-yellow);
    border: 3px solid var(--neon-yellow);
    border-radius: 12px;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
    max-width: 100%;
}

.camera-word-submit:hover {
    background: var(--neon-yellow);
    border-color: var(--neon-yellow);
    transform: none;
    box-shadow: none;
}

/* Инструменты внутри камеры */
.camera-tools-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.camera-word-display {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-yellow);
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: none;
}

.camera-word-display span {
    color: #fff;
}

.camera-tools-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.camera-tool-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.camera-tool-btn:hover {
    background: var(--neon-yellow);
    border-color: var(--neon-yellow);
    transform: none;
}

.camera-tool-btn.active {
    background: var(--neon-yellow);
    border-color: var(--neon-yellow);
    box-shadow: none;
}

.camera-colors-row {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
}

.camera-color-btn {
    width: 35px;
    height: 35px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: none;
}

.camera-color-btn:hover {
    transform: none;
    border-color: #fff;
}

.camera-color-btn.active {
    border-color: var(--neon-yellow);
    box-shadow: none;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .camera-word-btn {
        font-size: 1.3rem;
        padding: 1rem 1.5rem;
        min-width: 120px;
    }
    
    .camera-tool-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .camera-color-btn {
        width: 30px;
        height: 30px;
    }
}

/* Анимация подключения */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.action-btn.connecting {
    pointer-events: none;
    opacity: 0.7;
}

.action-btn.connecting::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Камера стримера */
.streamer-camera {
    width: 100%;
    height: 253px;
    flex-shrink: 0;
    flex-grow: 0;
}

/* Модальное окно результата раунда */
.round-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.round-modal.hidden {
    display: none !important;
}

.round-modal-content {
    background: linear-gradient(to right, rgba(25, 25, 25, 1), rgba(22, 22, 22, 1));
    border: 2px solid var(--neon-yellow);
    border-radius: 16px;
    padding: 2rem;
    max-width: 900px;
    width: 85%;
    aspect-ratio: 16 / 9;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.round-modal-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.round-modal-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neon-yellow);
    letter-spacing: 3px;
    text-shadow: none;
}

.round-modal-body {
    margin-bottom: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.round-result-word {
    text-align: center;
    margin-bottom: 2rem;
}

.result-label {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.result-word {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.round-winner-section {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.round-winner-section .result-label {
    margin-top: 1rem;
}

.round-winner-section .result-label:first-child {
    margin-top: 0;
}

.result-winner {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-yellow);
    margin-bottom: 1rem;
}

.result-points {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success);
    text-shadow: 0 0 20px rgba(48, 209, 88, 0.5);
}

.round-no-winner-section {
    text-align: center;
    padding: 2rem;
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.round-no-winner-section .result-label {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.modal-continue-btn {
    width: 100%;
    background: var(--neon-yellow);
    border: 2px solid var(--neon-yellow);
    border-radius: 12px;
    padding: 1.2rem 2rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.modal-continue-btn:hover {
    background: var(--neon-yellow-dim);
    box-shadow: none;
    transform: translateY(-2px);
}
