/* style.css - Основные стили */
@import url('https://fonts.googleapis.com/css2?family=Zalando+Sans+Expanded:ital,wght@0,200..900;1,200..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=TikTok+Sans:opsz,wght@12..36,300..900&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

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

body {
    font-family: 'TikTok Sans', sans-serif;
    font-weight: 400;
    background-color: #ffffff;
    color: #333333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.5;
}

.container {
    max-width: 900px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.header h1 {
    font-size: 2.5rem;
    color: #000000;
    font-weight: 500;
}

.settings-btn {
    background: none;
    border: 2px solid #000000;
    border-radius: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #000000;
}

.settings-btn:hover {
    background-color: #000000;
    color: white;
}

.material-icons {
    font-size: 24px;
}

.time-frame {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 50px 30px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid #333333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.time-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.time-digit {
    font-family: 'Zalando Sans Expanded', sans-serif;
    font-weight: 500;
    font-size: 10rem;
    color: #ffffff;
    text-align: center;
    position: relative;
    width: 140px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.time-separator {
    font-family: 'Zalando Sans Expanded', sans-serif;
    font-weight: 500;
    font-size: 10rem;
    color: #ffffff;
    margin: 0 5px;
    opacity: 0.9;
}

.digit-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.current-digit, .next-digit {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-digit {
    transform: translateY(0);
}

.next-digit {
    transform: translateY(100%);
}

.digit-changing .current-digit {
    transform: translateY(-100%);
}

.digit-changing .next-digit {
    transform: translateY(0);
}

.time-info {
    text-align: center;
    margin-top: 25px;
}

.time-label {
    font-size: 1.4rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.date-display {
    font-size: 1.2rem;
    color: #aaaaaa;
}

.timezone-display {
    font-size: 1rem;
    color: #666666;
    margin-top: 8px;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 500;
    color: #000000;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666666;
    width: 36px;
    height: 36px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

.timezone-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-family: 'TikTok Sans', sans-serif;
    font-size: 1rem;
    margin-bottom: 20px;
    background-color: #ffffff;
    color: #333333;
    cursor: pointer;
}

.timezone-select:focus {
    outline: none;
    border-color: #000000;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 16px;
    font-family: 'TikTok Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-btn {
    background-color: #000000;
    color: #ffffff;
}

.save-btn:hover {
    background-color: #333333;
}

.cancel-btn {
    background-color: #f0f0f0;
    color: #333333;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

/* Стили для формы сохранения */
.save-form {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-family: 'TikTok Sans', sans-serif;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #000000;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.alert {
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.saved-times {
    margin-top: 40px;
}

.saved-times table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.saved-times th, .saved-times td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.saved-times th {
    font-weight: 500;
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    .time-digit {
        font-size: 6rem;
        width: 80px;
        height: 100px;
    }
    
    .time-separator {
        font-size: 6rem;
        margin: 0 3px;
    }
    
    .modal {
        padding: 30px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .saved-times table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .time-digit {
        font-size: 4rem;
        width: 60px;
        height: 80px;
    }
    
    .time-separator {
        font-size: 4rem;
        margin: 0 2px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header {
        gap: 10px;
    }
    
    .time-frame {
        padding: 30px 15px;
    }
}