/* Основные стили */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1, h2, h3, h4 {
    color: var(--secondary-color);
}

.location-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Легенда */
.legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.new-moon {
    background-color: var(--dark-color);
    color: white;
}

.full-moon {
    background-color: #f39c12;
    color: white;
}

.waxing {
    background-color: #d4e6f1;
}

.waning {
    background-color: #e8d4f1;
}

.lucky-left {
    background-color: #a3e4d7;
}

.lucky-right {
    background-color: #f5b7b1;
}

/* Дни недели */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

/* Календарь */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day {
    aspect-ratio: 1;
    padding: 5px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-color: white;
    box-shadow: var(--box-shadow);
}

.day:hover {
    transform: scale(1.05);
    z-index: 2;
}

.day.today {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.day-number {
    font-weight: bold;
    font-size: 14px;
}

.moon-phase {
    font-size: 20px;
}

.lunar-day {
    font-size: 12px;
    opacity: 0.8;
}

.direction {
    font-size: 14px;
    font-weight: bold;
}

.lucky {
    position: absolute;
    top: 2px;
    right: 2px;
    font-weight: bold;
    color: var(--accent-color);
}

/* Детали дня */
.current-day-details {
    margin-top: 30px;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

#lucky-indicator {
    font-weight: bold;
    margin-left: 10px;
}

#lucky-indicator.lucky-left {
    color: #27ae60;
}

#lucky-indicator.lucky-right {
    color: #e74c3c;
}

/* Элементы */
.elements-container {
    margin-top: 20px;
}

.element-group {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.element-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.element-periods {
    font-family: monospace;
    font-size: 0.9em;
    color: #555;
    overflow-x: auto;
    white-space: nowrap;
}

/* Цвета элементов */
.akasha { color: #9b59b6; }
.air { color: #3498db; }
.fire { color: #e74c3c; }
.water { color: #2980b9; }
.earth { color: #27ae60; }

/* Кнопки */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

button {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: var(--secondary-color);
}

/* Адаптивность */
@media (max-width: 768px) {
    .legend {
        flex-direction: column;
        align-items: center;
    }
    
    .weekdays, .calendar-grid {
        grid-template-columns: repeat(7, minmax(30px, 1fr));
    }
    
    .day {
        aspect-ratio: 1;
        padding: 2px;
    }
    
    .day-number, .moon-phase, .direction {
        font-size: smaller;
    }
    
    .element-periods {
        font-size: 0.8em;
    }
}
/* Добавляем новые стили */
.current-element-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
}

.current-time {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.active-element {
    font-size: 1.5em;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.next-element {
    font-size: 1.1em;
    color: #666;
}

.time-left {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
}

/* Остальные существующие стили остаются без изменений */