/* ==========================================================================
   Punjabi Mania - Premium Glassmorphic Calendar Stylesheet
   ========================================================================== */

:root {
    --cal-bg: #f8fafc;
    --cal-card-bg: rgba(255, 255, 255, 0.8);
    --cal-border: rgba(226, 232, 240, 0.8);
    --cal-text: #1e293b;
    --cal-muted: #64748b;
    --cal-primary: #ed1e24;
    --movie-color: #2563eb; /* Premium Sapphire Blue */
    --event-color: #dc2626; /* Premium Ruby Red */
    --glass-blur: 12px;
    --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Layout */
.calendar-page {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 80vh;
    padding-bottom: 80px;
    color: var(--cal-text);
}

/* Hero Section */
.cal-hero {
    background: linear-gradient(135deg, #090d16 0%, #111827 100%);
    padding: 70px 0 50px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.cal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(237, 30, 36, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.cal-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.2rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cal-hero p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.cal-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Control Bar (Glassmorphic) */
.cal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--cal-card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 20px 30px;
    border-radius: 24px;
    border: 1px solid var(--cal-border);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    transition: var(--transition-smooth);
}

.cal-controls:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(226, 232, 240, 1);
}

.cal-nav-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--cal-text);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.cal-nav-btn:hover {
    background: var(--cal-primary);
    color: white;
    border-color: var(--cal-primary);
    transform: scale(1.08);
}

.cal-nav-btn span {
    font-size: 24px;
    font-weight: bold;
}

.cal-current-month {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    min-width: 280px;
    text-align: center;
    letter-spacing: -0.3px;
}

.cal-filters {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(241, 245, 249, 0.6);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.cal-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cal-text);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-movie { background: var(--movie-color); box-shadow: 0 0 8px rgba(37, 99, 235, 0.4); }
.legend-event { background: var(--event-color); box-shadow: 0 0 8px rgba(220, 38, 38, 0.4); }

/* Calendar Grid Card */
.cal-wrapper {
    background: var(--cal-card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 28px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--cal-border);
    position: relative;
    transition: var(--transition-smooth);
}

.cal-wrapper:hover {
    box-shadow: var(--shadow-lg);
}

/* Calendar Days Header */
.cal-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(241, 245, 249, 0.8);
    border-bottom: 1px solid var(--cal-border);
}

.cal-day-name {
    font-family: 'Montserrat', sans-serif;
    padding: 16px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--cal-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Day Cells */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, auto);
}

.cal-cell {
    border-right: 1px solid var(--cal-border);
    border-bottom: 1px solid var(--cal-border);
    padding: 12px;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    transition: var(--transition-smooth);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cal-cell:nth-child(7n) { border-right: none; }

.cal-cell.empty {
    background: rgba(248, 250, 252, 0.4);
}

.cal-cell.today {
    background: radial-gradient(circle at 10% 20%, rgba(254, 242, 242, 0.8) 0%, rgba(255, 255, 255, 0.9) 90%);
    box-shadow: inset 0 0 0 2px rgba(237, 30, 36, 0.2);
}

.cal-cell.today .cal-date-num {
    background: var(--cal-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(237, 30, 36, 0.35);
}

.cal-date-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--cal-text);
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.empty .cal-date-num {
    color: #cbd5e1;
    font-weight: 500;
}

/* Items List inside grid */
.cal-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.cal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    min-width: 0;
}

.cal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.cal-item.type-movie {
    background: rgba(37, 99, 235, 0.08);
    color: var(--movie-color);
    border-color: rgba(37, 99, 235, 0.15);
}

.cal-item.type-movie:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
}

.cal-item.type-event {
    background: rgba(220, 38, 38, 0.08);
    color: var(--event-color);
    border-color: rgba(220, 38, 38, 0.15);
}

.cal-item.type-event:hover {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.3);
}

.cal-item-img {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.4);
}

.cal-item-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.cal-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.cal-item-location {
    font-size: 0.68rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-top: 1px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.cal-item-location span {
    font-size: 11px;
    margin-right: 2px;
}

/* Loading Spinner Overlay */
.loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cal-wrapper.loading .loader-overlay {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(237, 30, 36, 0.15);
    border-top-color: var(--cal-primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

/* Mobile View Elements */
.cal-mobile-list {
    display: none;
    margin-top: 20px;
}

.mobile-day-block {
    background: var(--cal-card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--cal-border);
    transition: var(--transition-smooth);
}

.mobile-day-block:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.mobile-date-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-date-header-num {
    font-family: 'Montserrat', sans-serif;
    color: var(--cal-primary);
    font-size: 1.6rem;
    font-weight: 900;
}

.mobile-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(226, 232, 240, 0.4);
    text-decoration: none !important;
    color: var(--cal-text);
    transition: var(--transition-smooth);
}

.mobile-item:hover {
    background: white;
    border-color: rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.mobile-item-img {
    width: 64px;
    height: 86px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.mobile-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.mobile-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.mobile-tag.movie { background: rgba(37, 99, 235, 0.1); color: var(--movie-color); }
.mobile-tag.event { background: rgba(220, 38, 38, 0.1); color: var(--event-color); }

.mobile-item-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-item-meta {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--cal-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.mobile-item-meta span {
    font-size: 16px;
}

/* Empty State Styling */
.cal-empty-state {
    text-align: center; 
    padding: 50px 30px; 
    background: var(--cal-card-bg); 
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px; 
    border: 1px solid var(--cal-border);
    box-shadow: var(--shadow-sm);
}

.cal-empty-state span {
    font-size: 3.5rem; 
    color: #cbd5e1; 
    margin-bottom: 12px;
}

.cal-empty-state h3 {
    font-family: 'Playfair Display', serif;
    color: var(--cal-muted); 
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 992px) {
    .cal-hero {
        padding: 50px 0 35px;
    }
    
    .cal-hero h1 {
        font-size: 2.4rem;
    }

    .cal-hero p {
        font-size: 1rem;
    }

    .cal-header-row { display: none; }
    .cal-grid { display: none; }
    .cal-mobile-list { display: block; }
    .cal-wrapper { background: transparent; box-shadow: none; border: none; }
    .cal-controls { 
        flex-direction: column; 
        gap: 20px; 
        padding: 20px;
    }
    .cal-filters { 
        width: 100%; 
        justify-content: center; 
    }
    .month-controls { 
        display: flex; 
        width: 100%; 
        justify-content: space-between; 
        align-items: center; 
    }
}
