/* Astronomical Lunisolar Calendar Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.date-selector label {
    font-weight: 600;
    color: #2c3e50;
}

.date-selector input,
.date-selector select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.date-selector input:focus,
.date-selector select:focus {
    outline: none;
    border-color: #3498db;
}

.date-selector button {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.date-selector button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.calendar-container {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.lunar-info,
.solar-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.lunar-info h3,
.solar-info h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.lunar-info div,
.solar-info div {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9em;
}

.calendar-grid {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    font-weight: 700;
    padding: 12px;
    background: linear-gradient(45deg, #34495e, #2c3e50);
    color: white;
    border-radius: 8px;
    font-size: 0.9em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    min-height: 90px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.calendar-day.today {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    font-weight: bold;
}

.calendar-day.other-month {
    opacity: 0.3;
}

.day-number {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.lunar-info-day {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.7em;
}

.moon-phase {
    font-size: 1.4em;
    text-align: center;
}

.lunar-age,
.illumination {
    background: rgba(52, 152, 219, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
    text-align: center;
    font-size: 0.6em;
}

.calendar-systems {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.calendar-systems h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.calendar-conversions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.calendar-conversions div {
    background: rgba(231, 76, 60, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    font-weight: 500;
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
    padding: 20px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .calendar-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-conversions {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-selector > * {
        margin-bottom: 10px;
    }
    
    .calendar-day {
        min-height: 70px;
        font-size: 0.8em;
    }
    
    .weekday {
        padding: 8px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .lunar-info,
    .solar-info,
    .calendar-grid,
    .calendar-systems {
        padding: 15px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 1em;
    }
    
    .lunar-info-day {
        gap: 1px;
    }
}

/* Animation for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}