/* ===== КОМПОНЕНТЫ ИНТЕРФЕЙСА ===== */

/* ===== ЗАГОЛОВОК ===== */
.title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* ===== БЛОКИ СЦЕНАРИЯ ===== */
.screenplay-block {
    font-size: clamp(0.7rem, 1.8vw, 1rem);
    color: #f0f0f0;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    opacity: 0;
    transform: translateY(50px);
    margin: 1rem 0;
    text-align: left;
    background: rgba(0,0,0,0.3);
    padding: clamp(1rem, 2vw, 1.5rem) clamp(1.5rem, 3vw, 2rem);
    border-radius: 10px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.screenplay-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.3), 
        transparent);
}

/* ===== КУРСОР ПЕЧАТНОЙ МАШИНКИ ===== */
.cursor {
    display: inline-block;
    width: 0;
    height: 1.2em;
    border-right: 2px solid #fff;
    margin-left: 2px;
    vertical-align: text-bottom;
}

/* ===== КОПИРАЙТ ===== */
.copyright {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    z-index: 1000;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.copyright-dev {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright-dev:hover {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .copyright {
        bottom: 15px;
        right: 15px;
        font-size: 0.7rem;
    }
    
    .copyright-dev {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .copyright {
        bottom: 10px;
        right: 10px;
        font-size: 0.6rem;
    }
    
    .copyright-dev {
        font-size: 0.55rem;
    }
}

/* ===== ОТЛАДОЧНАЯ ПАНЕЛЬ ===== */
.debug {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 1rem;
    border-radius: 5px;
    z-index: 10000;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    display: none;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.debug.visible {
    display: block;
}

.debug::before {
    content: '🐛 DEBUG';
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #00ff00;
}

/* ===== СООБЩЕНИЯ ОБ ОШИБКАХ ===== */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    z-index: 10000;
    font-family: 'Courier New', monospace;
    border: 2px solid #ff6666;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.error-message h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message p {
    margin-bottom: 0.5rem;
}

/* ===== ФИНАЛЬНЫЙ ЭКРАН ===== */
.end-screen {
    text-align: center;
    font-size: 1.5rem;
}

.end-screen h2 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.end-screen p {
    opacity: 0.7;
    font-size: 1rem;
}

/* ===== ТАЙМЕР ===== */
.timer {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.3);
    color: #ff4444;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    z-index: 1001;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    border: 1px solid rgba(255,0,0,0.3);
    backdrop-filter: blur(2px);
    text-shadow: none; /* Убрать свечение */
    transition: none;  /* Убрать плавные переходы */
    min-width: 140px;
    text-align: center;
}

.timer.expired {
    color: #00ff00;
    border-color: rgba(68,255,68,0.3);
    text-shadow: none; /* Убрать красное свечение */
    background: rgba(0,255,0,0.1);
}

/* ===== АУДИО ===== */
#bgAudio {
    display: none;
}

/* ===== АУДИО КОНТРОЛЫ ===== */
.audio-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
}

.audio-toggle {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.audio-toggle:hover {
    background: rgba(0,0,0,0.6);
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.4);
}

.audio-toggle.enabled {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.4);
}

.audio-toggle.disabled {
    color: rgba(255,100,100,0.8);
    border-color: rgba(255,100,100,0.3);
}

.audio-prompt {
    position: fixed;
    top: 75px;
    right: 20px;
    background: rgba(0,0,0,0.3);
    color: rgba(255,255,255,0.8);
    padding: 0.7rem 1rem;
    border-radius: 20px;
    z-index: 1002;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(2px);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 200px;
    text-align: center;
}

.audio-prompt.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Стили для разных типов строк */
.screenplay-block .dialogue-line {
    margin-top: 0.8em;
}

.text-container {
    bottom: 20px;
    left: 20px;
}

/* ===== ДИСКЛЕЙМЕР ===== */

/* Ссылка дисклеймера */
.disclaimer-link {
    position: fixed;
    top: 85px;
    left: 20px;
    color: rgba(255,255,255);
    font-family: 'Courier New', monospace;
    font-size: 1.0rem;
    cursor: pointer;
    border-bottom: 3px dashed rgba(255,255,255);
    z-index: 1001;
    transition: color 0.3s ease;
    user-select: none;
}

.disclaimer-link:hover {
    color: rgba(255,255,255,0.7);
    border-bottom-color: rgba(255,255,255,0.7);
}

/* Модальное окно дисклеймера */
.disclaimer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.disclaimer-modal.visible {
    opacity: 1;
    visibility: visible;
}

/* Контент модального окна */
.disclaimer-content {
    background: rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Заголовок модального окна */
.disclaimer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.disclaimer-header h3 {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    margin: 0;
}

/* Кнопка закрытия */
.disclaimer-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.disclaimer-close:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
}

/* Текст дисклеймера */
.disclaimer-text {
    padding: 1.5rem 2rem 2rem 2rem;
    color: #f0f0f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.disclaimer-text p {
    margin: 0 0 1rem 0;
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {

    .disclaimer-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .disclaimer-header {
        padding: 1rem 1.5rem 0.5rem 1.5rem;
    }
    
    .disclaimer-header h3 {
        font-size: 1rem;
    }
    
    .disclaimer-text {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
        font-size: 1.0rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    
    .disclaimer-text {
        font-size: 0.75rem;
    }
}


/* Стиль для текста с ограниченной шириной */
.limited-width {
    display: inline-block;
    width: 50%;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
    vertical-align: top;
}

/* ===== КОНТАКТНАЯ ИНФОРМАЦИЯ ===== */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    line-height: 1.0;
}

.contact-project {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: bold;
}

.contact-email {
    color: #00ff00;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer; 
}

.contact-email:hover {
    color: #ffffff;
    text-decoration: underline;
}
.contact-dev {
    color: rgba(255,255,255,0.7);
    font-size: 0.70rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-dev:hover {
    color: #ffffff;
    text-decoration: underline;
}

.timer.expired {
    padding: 1rem 1.2rem;
    min-width: 200px;
    width: auto;
    text-align: left;
}

/* ===== УВЕДОМЛЕНИЕ О КОПИРОВАНИИ ===== */
.copy-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0,0,0,0.9);
    color: #4ecdc4;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(78, 205, 196, 0.5);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    white-space: nowrap; /* Не переносить текст */
}

.copy-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .copy-notification {
        top: 15px;
        font-size: 0.7rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .copy-notification {
        top: 10px;
        font-size: 0.65rem;
        padding: 0.4rem 0.8rem;
    }
}