:root {
    --primary-color: #c41e3a;
    --secondary-color: #1d3557;
    --background-color: #ffffff;
    --text-color: #000000;
    --border-color: #cccccc;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.calendar-container {
    max-width: 1000px;
    margin: 15px auto;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    border-radius: 15px;
    border: 1.5px solid var(--border-color);
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 20px;
    padding: 0 10px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    background: linear-gradient(to right, #1e3a8a, #1e3a8a);
    color: white;
    border-spacing: 2px;
}

.weekdays > div {
    padding: 10px;
    border-right: 2px solid white;
    font-size: 14px;
}

.weekdays > div:last-child {
    background: #ff0000;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.08);
}

.calendar-day {
    background: white;
    min-height: 80px;
    padding: 5px;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

.nepali-date {
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.english-date {
    font-size: 12px;
    color: #0000ff;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

.tithi {
    font-size: 12px;
    color: #006400;
}

.event {
    font-size: 11px;
    color: #006400;
    margin-top: 2px;
}

.calendar-day.saturday .nepali-date {
    color: #c41e3a;
}

.calendar-day.holiday {
    background-color: #fff0f0;
}

.calendar-day.today {
    background-color: #cffcfc;
    border: 2px solid var(--primary-color);
    box-shadow: inset 0 0 5px rgba(var(--primary-color), 0.1);
}

.calendar-day.empty {
    background: #f5f5f5;
}

/* Additional styles for events and holidays */
.holiday-marker {
    color: #c41e3a;
    font-size: 11px;
    margin-top: 2px;
}

.lunar-event {
    color: #0000ff;
    font-size: 11px;
    margin-top: 2px;
}

.year-month-picker select {
    padding: 5px 10px;
    margin: 0 5px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.navigation-buttons button {
    padding: 5px 15px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.navigation-buttons button:hover {
    opacity: 0.9;
}

.calendar-controls {
    background: #f8f9fa;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.date-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

.close-button {
    float: right;
    cursor: pointer;
    font-size: 24px;
}

.events-summary {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

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

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

.date-details {
    margin-top: 20px;
}

.date-details h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.date-details div {
    margin: 8px 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .calendar-container {
        margin: 8px;
        border-radius: 12px;
        box-shadow: 0 3px 15px rgba(0,0,0,0.15);
    }

    .calendar-days {
        gap: 0;
        border: none;
        box-shadow: none;
    }

    .calendar-day {
        min-height: 42px;
        padding: 1px;
        border-right: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }

    .calendar-day:hover {
        background-color: #f8f9fa;
        box-shadow: none;
    }

    .weekdays, .calendar-days {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        width: 100%;
        box-sizing: border-box;
    }

    .weekdays > div {
        padding: 3px 0;
        font-size: 10px;
        line-height: 1.1;
        border-right: 1px solid rgba(255,255,255,0.2);
    }

    .nepali-date {
        font-size: 13px;
        margin-bottom: 0;
        line-height: 1.2;
    }

    .english-date {
        font-size: 7px;
        right: 1px;
        bottom: 1px;
    }

    .tithi {
        font-size: 7px;
        line-height: 1;
        margin: 0;
    }

    .event {
        font-size: 7px;
        line-height: 1;
        margin: 0;
        padding: 1px 0;
    }

    .calendar-controls {
        padding: 4px;
        gap: 4px;
        flex-wrap: wrap;
        border-bottom: 1px solid #eee;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .year-month-picker {
        width: 100%;
        display: flex;
        gap: 4px;
    }

    .year-month-picker select {
        flex: 1;
        padding: 3px;
        font-size: 12px;
    }

    .navigation-buttons {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 4px;
    }

    .navigation-buttons button {
        flex: 1;
        padding: 4px 0;
        margin: 0;
        font-size: 12px;
    }

    .monthly-summary {
        padding: 8px;
    }

    .summary-header h3 {
        font-size: 14px;
    }

    .total-count {
        font-size: 11px;
        padding: 1px 6px;
    }

    .event-card {
        padding: 6px;
        gap: 6px;
        margin-bottom: 6px;
    }

    .event-date-box {
        min-width: 40px;
        padding: 3px;
    }

    .event-date-box .day {
        font-size: 16px;
        margin-bottom: 1px;
    }

    .event-date-box .day-name {
        font-size: 9px;
        margin-bottom: 1px;
    }

    .event-date-box .gate {
        font-size: 8px;
    }

    .event-details {
        padding-top: 0;
    }

    .event-name {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .event-meta {
        font-size: 10px;
        gap: 4px;
    }
}

@media (max-width: 320px) {
    .calendar-day {
        min-height: 38px;
    }

    .nepali-date {
        font-size: 12px;
    }

    .english-date, .event, .tithi {
        font-size: 6px;
    }

    .weekdays > div {
        font-size: 8px;
        padding: 2px 0;
    }
}

.monthly-summary {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

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

.summary-header h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin: 0;
}

.total-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
}

.event-card {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.event-date-box {
    background: var(--primary-color);
    color: white;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    min-width: 70px;
}

.event-date-box .day {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 2px;
}

.event-date-box .day-name {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.event-date-box .gate {
    font-size: 12px;
    opacity: 0.8;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 2px;
    margin-top: 2px;
}

.event-details {
    flex: 1;
    padding-top: 4px;
}

.event-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.event-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #666;
    font-size: 13px;
}

.tithi-label {
    color: var(--primary-color);
    font-weight: 500;
}

.no-events {
    text-align: center;
    padding: 20px;
    color: #666;
    background: white;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.date-details {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.date-details-row {
    display: flex;
    margin-bottom: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.date-details-label {
    width: 120px;
    font-weight: bold;
    color: var(--primary-color);
}

.date-details-value {
    flex: 1;
} 