.container-calendar {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-header {
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.month-year {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.range-info {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}

.calendar-grid {
    padding: 30px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 20px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    padding: 15px;
    font-size: 1.1rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    padding: 5px;
}

.day:hover {
    background: #f3f4f6;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.day.other-month {
    color: #d1d5db;
    background: #f9fafb;
}

.day.today {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.day.selected {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 700;
}

.day.in-range {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    font-weight: 600;
}

.day.range-start {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 700;
    position: relative;
}

.day.range-end {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 700;
}

.day.range-start::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1px;
    width: 50%;
    height: 2px;
    background: #3b82f6;
    transform: translateY(-50%);
}

.day.range-end::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -1px;
    width: 50%;
    height: 2px;
    background: #3b82f6;
    transform: translateY(-50%);
}

.day.has-event {
    cursor: pointer;
}

.day.has-event:hover {
    opacity: 0.9;
}

.controls {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.event-name {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== EVENT CARD - Base (Desktop) ===== */
.event-card {
    margin-top: 4px;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.15); 
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== BADGES ===== */
#eventModal .badge {
    font-size: 12px;
    padding: 6px 10px;
    margin-left: 10px;
}

.badge-success {
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 12px;
}

.badge-info {
    display: inline-block;
    background-color: #17a2b8;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 12px;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .calendar-header {
        padding: 20px;
    }

    .month-year {
        font-size: 2rem;
    }

    .calendar-grid {
        padding: 20px;
    }

    .day {
        min-height: 60px;
        font-size: 1rem;
    }

    .weekday {
        padding: 10px;
        font-size: 0.9rem;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .event-card {
        font-size: 6px !important;
        padding: 3px 5px !important;
        line-height: 1.1 !important;
    }
}

@media (max-width: 480px) {
    .calendar-header {
        padding: 12px 10px;
    }

    .calendar-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        flex-wrap: nowrap;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 13px;
        border-radius: 30px;
        flex: 0 0 auto;
    }
 
    .month-year {
        font-size: 1.5rem;
    }

    .day {
        min-height: 50px;
        font-size: 0.9rem;
    }

    .weekday {
        padding: 8px;
        font-size: 0.8rem;
    }

    .controls {
        padding: 15px 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }

    .event-card {
        font-size: 6px !important;
        padding: 2px 4px !important;
        line-height: 1 !important;
        margin-top: 2px !important;
    }

    #calendar .day-number {
        font-size: 11px;
    }
}