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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calendar-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 500px;
    width: 100%;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

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

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

#monthYear {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#prevMonth, #nextMonth {
    background: #f0f0f0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#prevMonth:hover, #nextMonth:hover {
    background: #e0e0e0;
}

#settingsBtn {
    background: #667eea;
    color: white;
}

#settingsBtn:hover {
    background: #5a6fd6;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.weekdays div {
    font-weight: bold;
    color: #666;
    padding: 10px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.calendar-day:hover {
    transform: scale(1.1);
}

.calendar-day.today {
    background: var(--today-color, #ff6b6b);
    color: white;
    font-weight: bold;
}

.calendar-day.weekend {
    background: var(--weekend-color, #f0f0f0);
    color: #999;
}

.calendar-day.holiday {
    background: var(--holiday-color, #ff9f43);
    color: white;
}

.calendar-day.holiday::after {
    content: '🎉';
    position: absolute;
    font-size: 0.6rem;
    bottom: 2px;
}

.calendar-day.empty {
    cursor: default;
}

.holidays-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.add-holiday-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.add-holiday-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.add-holiday-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.add-holiday-form input[type="date"] {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.add-holiday-form input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

.add-holiday-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
}

.add-holiday-form input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.add-holiday-form input[type="text"]::placeholder {
    color: #adb5bd;
}

.add-holiday-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-holiday-form button:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a41b0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-holiday-form button:active {
    transform: translateY(0);
}

.holidays-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#holidaysList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.holiday-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.holiday-date {
    font-weight: bold;
    color: var(--holiday-color, #ff9f43);
}

.holiday-name {
    color: #333;
}

.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.settings-modal.active {
    display: flex;
}

.settings-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.settings-content h2 {
    margin-bottom: 20px;
    color: #333;
}

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

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.setting-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.setting-group textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    resize: vertical;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
}

#saveSettings {
    background: #667eea;
    color: white;
}

#saveSettings:hover {
    background: #5a6fd6;
}

#closeSettings {
    background: #f0f0f0;
    color: #333;
}

#closeSettings:hover {
    background: #e0e0e0;
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 20px;
    }
    
    #monthYear {
        font-size: 1.2rem;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
}