:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-hijri: #38bdf8;
    --text-hijri-sub: #7dd3fc;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --border-color: rgba(255, 255, 255, 0.08);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    /* Rich aesthetic with dark background and vibrant gradients */
    background: linear-gradient(135deg, #020617 0%, #172554 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}


.calendar-container {
    background: var(--card-bg);
    /* Glassmorphism effect */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.1);
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}


.header button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}


.header button:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}


.header button:active {
    transform: translateY(0);
}


.month-title {
    text-align: center;
}


.month-title h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}


.month-title h2 {
    font-size: 0.95rem;
    color: var(--text-hijri);
    font-weight: 500;
    margin-top: 0.35rem;
}


.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}


.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
}


.day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}


.day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}


.day.empty {
    background: transparent;
    cursor: default;
}


.day .masehi {
    font-size: 1.05rem;
    font-weight: 600;
    z-index: 2;
}


.day .hijri {
    font-size: 0.7rem;
    color: var(--text-hijri-sub);
    margin-top: 2px;
    font-weight: 500;
    z-index: 2;
}


/* Highlight today */
.day.today {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}


.day.today .hijri {
    color: rgba(255, 255, 255, 0.9);
}


.day.today:hover:not(.empty) {
    background: linear-gradient(135deg, #818cf8 0%, var(--accent) 100%);
    transform: scale(1.08);
}


.today-panel {
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}


.today-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, var(--accent));
}


.today-panel p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}


.today-panel h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}


.today-panel h4 {
    font-size: 1.1rem;
    color: var(--text-hijri);
    font-weight: 500;
}


.events-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}


.events-panel p {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}


.events-panel ul {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}


/* Custom Scrollbar for list */
.events-panel ul::-webkit-scrollbar {
    width: 6px;
}
.events-panel ul::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 6px;
}


.events-panel li {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.events-panel li .event-date {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
}


.events-panel li .event-name {
    color: var(--text-hijri);
    font-weight: 500;
}


/* Event Dot Indicator */
.event-dot {
    width: 6px;
    height: 6px;
    background-color: #f43f5e;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.8);
}


.day.has-event {
    border-bottom: 2px solid rgba(244, 63, 94, 0.4);
}


@media (max-width: 480px) {
    .calendar-container {
        padding: 1.5rem;
        border-radius: 20px;
    }
    .header {
        margin-bottom: 1.5rem;
    }
    .day .masehi {
        font-size: 0.95rem;
    }
    .day .hijri {
        font-size: 0.6rem;
    }
    .days-grid {
        gap: 0.4rem;
    }
}


:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-hijri: #38bdf8;
    --text-hijri-sub: #7dd3fc;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --border-color: rgba(255, 255, 255, 0.08);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    /* Rich aesthetic with dark background and vibrant gradients */
    background: linear-gradient(135deg, #020617 0%, #172554 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}


.calendar-container {
    background: var(--card-bg);
    /* Glassmorphism effect */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.1);
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}


.header button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}


.header button:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}


.header button:active {
    transform: translateY(0);
}


.month-title {
    text-align: center;
}


.month-title h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}


.month-title h2 {
    font-size: 0.95rem;
    color: var(--text-hijri);
    font-weight: 500;
    margin-top: 0.35rem;
}


.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}


.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
}


.day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}


.day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}


.day.empty {
    background: transparent;
    cursor: default;
}


.day .masehi {
    font-size: 1.05rem;
    font-weight: 600;
    z-index: 2;
}


.day .hijri {
    font-size: 0.7rem;
    color: var(--text-hijri-sub);
    margin-top: 2px;
    font-weight: 500;
    z-index: 2;
}


/* Highlight today */
.day.today {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
}


.day.today .hijri {
    color: rgba(255, 255, 255, 0.9);
}


.day.today:hover:not(.empty) {
    background: linear-gradient(135deg, #818cf8 0%, var(--accent) 100%);
    transform: scale(1.08);
}


.today-panel {
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}


.today-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, var(--accent));
}


.today-panel p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}


.today-panel h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}


.today-panel h4 {
    font-size: 1.1rem;
    color: var(--text-hijri);
    font-weight: 500;
}


.events-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}


.events-panel p {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}


.events-panel ul {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}


/* Custom Scrollbar for list */
.events-panel ul::-webkit-scrollbar {
    width: 6px;
}
.events-panel ul::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 6px;
}


.events-panel li {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.events-panel li .event-date {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.8rem;
}


.events-panel li .event-name {
    color: var(--text-hijri);
    font-weight: 500;
}


/* Event Dot Indicator */
.event-dot {
    width: 6px;
    height: 6px;
    background-color: #f43f5e;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.8);
}


.day.has-event {
    border-bottom: 2px solid rgba(244, 63, 94, 0.4);
}


@media (max-width: 480px) {
    .calendar-container {
        padding: 1.5rem;
        border-radius: 20px;
    }
    .header {
        margin-bottom: 1.5rem;
    }
    .day .masehi {
        font-size: 0.95rem;
    }
    .day .hijri {
        font-size: 0.6rem;
    }
    .days-grid {
        gap: 0.4rem;
    }
}


