:root {
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(31, 38, 135, 0.15);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-accent: #2563eb;
    --text-danger: #dc2626;

       --festival-color-1: rgba(147, 197, 253, 0.5);
    --festival-color-2: rgba(167, 243, 208, 0.5);
    --festival-color-3: rgba(253, 164, 175, 0.5);
    --festival-color-4: rgba(216, 180, 254, 0.5);
    --festival-color-5: rgba(252, 211, 77, 0.5);

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    padding: 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-accent);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
}

.calendar-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    padding: 25px;
}

.weekday-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    min-height: 120px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.calendar-day:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.75);
}

.calendar-day.empty {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.date-number {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    text-align: left;
}

.date-number.sunday {
    color: var(--text-danger);

    text-align: left;
    font-weight: 600;
    
    padding: 4px;
 
    
}
.date-number.weekday1 {
    color: var(--text-primary);
    text-align: left;
    font-weight: 600;   
       padding: 4px;
 
}

.date-number.ekadashi {
    color: #fb923c !important;
}

.tithi-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
     margin-bottom: 12px;
}

 .tithi-name.ekadashi {
            color: #fb923c !important;
        }


 .date-number.flag-1,
        .tithi-name.flag-1 {
            color: #dc2626 !important;
            /* Red for Flag 1 */
        }

/* Update the festival-item class */
.festival-item {
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px 0;
      backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-size: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

/* Add new classes for different festival colors */
.festival-item:nth-child(5n+1) {
    background: var(--festival-color-1);
}

.festival-item:nth-child(5n+2) {
    background: var(--festival-color-2);
}

.festival-item:nth-child(5n+3) {
    background: var(--festival-color-3);
}

.festival-item:nth-child(5n+4) {
    background: var(--festival-color-4);
}

.festival-item:nth-child(5n+5) {
    background: var(--festival-color-5);
}

/* Add hover effect */
.festival-item:hover {
    transform: translateX(2px);
}
/*
.festival-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
*/
.festival-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin: 1px 0;
}
 .festival-image-placeholder {
            width: 20px;
            height: 20px;
            display: inline-block;
        }
.legend {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    padding: 20px;
    margin-top: 20px;
}

.legend h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

      .legend-items {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

.legend-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
     display: flex;
            gap: 20px;
            flex-wrap: wrap;
}
.legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }


.video-thumbnails {
     position: absolute;
    top: 8px;
    right: 8px;
 
    display: flex;
      flex-direction: column;
    gap: 5px;
    flex-wrap: wrap;
     
     
}

.video-thumbnail {
      width: 40px;
    height: 22px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.3s ease;
    border: 1px solid var(--glass-border);
    object-fit: cover;
}

.video-thumbnail:hover {
    transform: scale(1.1);
}

.modal {
      display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: hidden;
}


.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);

     position: relative;
            width: 80%;
            max-width: 800px;
            margin: 50px auto;
            background: #fff;
            border-radius: 12px;
            padding: 20px;

            /* For Firefox */
}

/* Add custom scrollbar styling for Webkit browsers */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--glass-bg);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

   .close-modal {
            position: absolute;
            right: 10px;
            top: 10px;
            font-size: 24px;
            cursor: pointer;
            color: #fff;
            z-index: 1001;
        }

        .video-container {
            position: relative;
            padding-bottom: 10%;
            
            height: 450px;
             max-height: 80vh; /* Add this to limit height */
    overflow-y: auto; /* Add scrollbar when content overflows */
    scrollbar-width: thin;
        }

        .video-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

.youtube-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.youtube-icon:hover {
    transform: scale(1.1);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 20px;
}

.video-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: scale(1.05);
}

.video-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.video-item .video-title {
    font-size: 12px;
    padding: 8px;
    color: var(--text-primary);
}


.daily-detail-icon-1 {
    width: 20px;
    height: 20px;
    cursor: pointer;
    background: lightblue ;
    color:var(--glass-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-top: 0px;
   
}

.daily-detail-icon-1:hover {
    transform: scale(1.1);
}


.daily-detail-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    background:lightpink;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-top: 0px;
   
}

.daily-detail-icon:hover {
    transform: scale(1.1);
}

.daily-detail-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.daily-detail-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.daily-detail-date {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.daily-detail-desc {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.daily-detail-video {
    color: var(--text-accent);
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}

.date-description-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}


/* ...existing code... */

/* Add these media queries at the end of the file */

/* For tablets and smaller screens */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }

    .calendar-wrapper {
        padding: 15px;
    }

    .calendar-day {
        min-height: 100px;
    }

    .date-number {
        font-size: 20px;
    }
}

/* For mobile devices */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .nav-buttons {
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .weekday {
        font-size: 10px;
    }

    .calendar-grid {
        gap: 5px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 8px;
    }

    .date-number {
        font-size: 16px;
    }

    .tithi-name {
        font-size: 9px;
    }

    .festival-item {
        font-size: 7px;
        padding: 2px 4px;
    }

    .festival-image {
        width: 16px;
        height: 16px;
    }

    .video-thumbnails {
        top: 4px;
        right: 4px;
    }

    .video-thumbnail {
        width: 30px;
        height: 16px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 10px;
    }
}

/* For very small devices */
@media screen and (max-width: 480px) {
    .weekday-header {
        gap: 5px;
    }

    .weekday {
        font-size: 8px;
        padding: 2px;
    }

    .calendar-day {
        min-height: 70px;
        padding: 4px;
    }

    .date-number {
        font-size: 14px;
    }

    .festival-item {
        font-size: 6px;
    }

    .video-thumbnail {
        width: 24px;
        height: 14px;
    }

    .legend-items {
        gap: 10px;
    }

    .legend-item {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* For landscape orientation on mobile */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .modal-content {
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .video-container {
        padding-bottom: 40%;
    }
}

.panchang-details {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.0;
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
}

.detail-label {
    flex: 0 0 150px;
    font-weight: bold;
    color: var(--text-primary);
}

.detail-value {
    flex: 1;
    color: var(--text-secondary);
}

.festivals-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--glass-border);
}

.festivals-section h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.festivals-section ul {
    list-style: none;
    padding: 0;
}

.festivals-section li {
    padding: 6px 0;
    color: var(--text-secondary);
}