Загрузка данных


/* Базовые настройки для всего документа */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    /* Темно-синий "ночной" фон */
    background-color: #0f111a;
    color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Главный контейнер нашего приложения */
.app-container {
    background: #1a1d29;
    width: 100%;
    max-width: 450px;
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Шапка с иконкой */
header {
    text-align: center;
    margin-bottom: 30px;
}

header .icon {
    font-size: 48px;
    margin-bottom: 10px;
    /* Небольшая анимация покачивания луны */
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

header h1 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 6px;
    font-weight: 700;
}

header p {
    color: #94a3b8;
    font-size: 14px;
}

/* Стили для вкладок (переключателей) */
.tabs {
    display: flex;
    background: #0f111a;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #6366f1; /* Приятный фиолетово-синий акцент */
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Стили для панелей с контентом */
.panel {
    display: none; /* По умолчанию скрываем обе панели */
    animation: fadeIn 0.4s ease;
}

.panel.active {
    display: block; /* Показываем только активную */
}

.description {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* Поле для ввода времени */
.time-input-group {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

input[type="time"] {
    background: #0f111a;
    border: 2px solid #2d3142;
    color: #ffffff;
    font-size: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s ease;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
}

input[type="time"]:focus {
    border-color: #6366f1;
}

/* Главная кнопка */
.action-btn {
    width: 100%;
    background: #6366f1;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

.action-btn:hover {
    background: #4f46e5;
}

.action-btn:active {
    transform: scale(0.98);
}

/* Уведомление про 15 минут */
.notice {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2d3142;
}

/* Блок с результатами */
#results-container {
    margin-top: 24px;
    background: #0f111a;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #2d3142;
}

#results-title {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 16px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Стили для списка времени (понадобятся в JS) */
#times-list {
    list-style: none;
}

.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #1a1d29;
    margin-bottom: 8px;
    border-radius: 10px;
}

.time-val {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.time-cycles {
    font-size: 13px;
    color: #94a3b8;
}

/* Выделение оптимальных циклов (5-6) */
.optimal .time-val {
    color: #10b981; /* Зеленый цвет для хорошего сна */
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}