/* ============================================
   СТИЛИ ДЛЯ OBS (отображение спикера)
   ============================================ */

body.obs {
    margin: 0;
    padding: 0;
    width: 1920px;
    height: 1080px;
    background: transparent;
    font-family: Arial, sans-serif;
    overflow: hidden;
    position: relative;
}

/* ============================================
   ТАЙМЕР В ВЕРХНЕМ УГЛУ
   ============================================ */

#timer-overlay {
    position: fixed;
    top: 40px;
    right: 80px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 100%);
    padding: 20px 40px;
    border-radius: 16px;
    border: 4px solid #00adee;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 173, 238, 0.3);
    z-index: 1000;
    animation: timerSlideIn 0.5s ease forwards;
    backdrop-filter: blur(10px);
}

#timer-overlay.timer-position-left {
    left: 80px;
    right: auto;
}

#timer-overlay.timer-position-right {
    right: 80px;
    left: auto;
}

#timer-overlay.timer-hidden {
    display: none;
}

#timer-text {
    font-size: 56px;
    font-weight: bold;
    font-family: 'Courier New', 'Monaco', monospace;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 173, 238, 0.5), 
                 2px 2px 8px rgba(0, 0, 0, 0.9);
    letter-spacing: 8px;
    line-height: 1;
    min-width: 180px;
    text-align: center;
}

#timer-overlay.timer-warning {
    border-color: #f39c12;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(243, 156, 18, 0.5);
}

#timer-overlay.timer-warning #timer-text {
    color: #f39c12;
    text-shadow: 0 0 15px rgba(243, 156, 18, 0.7), 
                 2px 2px 8px rgba(0, 0, 0, 0.9);
    animation: timerPulse 1s infinite;
}

#timer-overlay.timer-danger {
    border-color: #e74c3c;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(231, 76, 60, 0.6);
}

#timer-overlay.timer-danger #timer-text {
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.8), 
                 2px 2px 8px rgba(0, 0, 0, 0.9);
    animation: timerPulse 0.5s infinite;
}

#timer-overlay.timer-finished {
    border-color: #e74c3c;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(231, 76, 60, 0.8);
    animation: timerBlink 0.5s infinite;
}

#timer-overlay.timer-finished #timer-text {
    color: #e74c3c;
    text-shadow: 0 0 25px rgba(231, 76, 60, 1), 
                 2px 2px 8px rgba(0, 0, 0, 0.9);
}

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

@keyframes timerPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.03);
    }
}

@keyframes timerBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.4;
    }
}

#lower-third {
    position: absolute;
    bottom: 60px;
    color: white;
    animation: slideUp 0.6s ease forwards;
    min-width: 300px;
    max-width: 600px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 15px;
    /* Позиция и граница управляются через JS */
}

.speaker-photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.speaker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-info {
    flex-grow: 1;
    min-width: 0;
}

#lower-third.style-classic {
    background: rgba(0,0,0,0.8);
    padding: 15px 25px;
    border-radius: 4px;
}

#lower-third.style-modern {
    background: linear-gradient(135deg, rgba(0,173,238,0.9), rgba(0,0,0,0.85));
    padding: 18px 28px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

#lower-third.style-minimal {
    background: transparent;
    padding: 0;
}

#lower-third.style-accent {
    background: rgba(0,0,0,0.75);
    padding: 12px 22px;
    border-radius: 2px;
    box-shadow: inset 0 -3px 0 rgba(0,173,238,0.8);
}

#lower-third.style-glass {
    background: rgba(20, 20, 20, 0.35);
    padding: 16px 26px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
}

#lower-third.style-broadcast {
    background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    padding: 14px 26px 14px 20px;
    border-radius: 0;
    border-top: 2px solid rgba(0,173,238,0.9);
    border-bottom: 2px solid rgba(0,173,238,0.9);
}

.hidden {
    display: none !important;
}

#lower-third.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

.name {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 5px;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100%;
}

#lower-third.style-modern .name {
    font-size: 30px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

#lower-third.style-minimal .name {
    font-size: 32px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

#lower-third.style-accent .name {
    font-size: 26px;
}

#lower-third.style-glass .name {
    font-size: 30px;
}

#lower-third.style-broadcast .name {
    font-size: 28px;
    letter-spacing: 0.6px;
}

.position {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.3;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    white-space: normal !important;
    max-width: 100%;
}

#lower-third.style-modern .position {
    font-size: 18px;
    opacity: 0.95;
}

#lower-third.style-minimal .position {
    font-size: 20px;
    opacity: 0.9;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

#lower-third.style-accent .position {
    font-size: 17px;
}

#lower-third.style-glass .position {
    font-size: 18px;
    opacity: 0.95;
}

#lower-third.style-broadcast .position {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@keyframes slideUp {
    from {
        transform: translateY(15px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ BOOTSTRAP
   ============================================ */

/* Плавная анимация для карточек */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Анимация пульсации для активного спикера */
@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.card-header.bg-success {
    animation: pulse-badge 2s infinite;
}
