/* style.css */
/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000000;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.timer {
    font-size: 15vw;
    font-weight: bold;
    color: white;
    background-color: black;
    width: 40%;
    height: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8vh;
    border-radius: 10px;
}

.button-group {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 8vh;
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.time-btn {
    background-color: #1e3a8a;
    color: white;
    flex: 1;
    max-width: 120px;
}

.control-btn {
    background-color: #dc2626;
    color: white;
    flex: 1;
    max-width: 120px;
}

.control-btn.stop {
    background-color: #ea580c;
}

.control-btn.ts-btn {
    background-color: #16a34a;
    max-width: 80px;
}

.event-btn {
    background-color: #4b5563;
    color: white;
    flex: 1;
    max-width: 140px;
}

.status-bar {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.offline {
    background-color: #dc2626;
}

.status-indicator.online {
    background-color: #16a34a;
}

.settings-btn, .log-btn, .ts-btn {
    background-color: #6b7280;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    max-width: 100px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1a1a1a;
    color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #333;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

.modal-content h4 {
    margin: 20px 0 10px 0;
    color: #60a5fa;
}

.connection-settings, .sound-settings, .feature-settings, .timer-settings {
    margin-bottom: 20px;
}

.ip-setting, .time-setting {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.ip-setting label, .time-setting label {
    margin-bottom: 5px;
}

.ip-setting input, .time-setting input {
    padding: 8px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2d2d2d;
    color: white;
}

.sound-controls {
    display: flex;
    flex-direction: column;
}

.sound-upload {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.sound-upload label {
    min-width: 80px;
    font-size: 14px;
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.sound-toggle input {
    margin: 0;
}

.feature-settings label {
    display: block;
    margin-bottom: 10px;
    color: white;
}

.feature-settings input[type="checkbox"] {
    margin-right: 8px;
}

.close-btn {
    background-color: #6b7280;
    color: white;
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .timer {
        font-size: 20vw;
        width: 60%;
        height: 15%;
    }
    
    .button-group {
        flex-wrap: wrap;
        margin-top: 5vh;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 15px;
        max-width: 100px;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .sound-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .timer {
        font-size: 25vw;
        width: 80%;
        height: 12%;
    }
    
    .button-group {
        margin-top: 4vh;
    }
    
    .btn {
        font-size: 12px;
        padding: 8px 12px;
        max-width: 80px;
    }
    
    .status-bar {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
        align-items: center;
    }
    
    .ip-setting, .time-setting {
        flex-direction: column;
    }
}



/* Добавляем в конец файла */
.relay-indicators {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 4vh;
}

.relay-indicator {
    width: 400px;
    height: 50px;
    border-radius: 10px;
    background-color: #000000;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    color: #666;
    transition: all 0.3s ease;
}

.relay-indicator.active {
    color: white;
}

.relay-indicator#blueRelay.active {
    background-color: #1e3a8a;
    border-color: #60a5fa;
}

.relay-indicator#redRelay.active {
    background-color: #dc2626;
    border-color: #f87171;
}

@media (max-width: 768px) {
    .relay-indicators {
        margin-top: 1vh;
    }
    
    .relay-indicator {
        width: 50px;
        height: 40px;
        font-size: 16px;
    }
}