:root {
    --primary: #3B82F6;
    --primary-light: #DBEAFE;
    --primary-dark: #1E3A8A;
    --background: #F9FaFB;
    --success: #d1fae5;
    --success-text: #065f46;
    --error: #fee2e2;
    --erro-text: #b91c1c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--background);
    color: #333;
    line-height: 1.6;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

/* Clock */

.clock-container {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem;
    text-align: center;
    font-family: "Inter", sans-serif;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--primary);
}

@media (max-width: 768px) {
    .clock-container {
        font-size: 1.4rem;
        padding: 0.75rem;
    }
}

/* Calenar Contantion */

.calendar {
    max-width: 1000px;
    margin: 2rem auto;
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.nav-btn {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-dark)
}


.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

/* Mobile (Grid) */
@media (max-width: 1024px) {
    .calendar-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
    }

    .day, .day-name {
        min-width: 140px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
}


.day, .day-name {
    text-align: center;
}


.day {
    background: #FFF;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-height: 100px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.day:hover {
    background: #f3f4f6;
}

.day.today {
    background: var(--primary-light);
    border-color: var(--primary-dark)
}

.date-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.event {
    background-color: var(--primary);
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease;
}

.event:hover {
    transform: scale(1.02);
}

.event .course {
    font-weight: bold;
    font-size: 13px;
}

.event .instructor {
    font-size: 12px;
    opacity: 0.85;
}

.event .time {
    font-size: 12px;
    margin-top: 3px;
    color: #f3f3f3;
}

.event-meta {
    font-size: 12px;
    color: #EEF;
    line-height: 1.2;
}

/* Alert Boxes */

.alert {
    max-width: 600px;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.success {
    background: var(--success);
    color: var(--success-text);
}

.error {
    background: var(--error);
    color: var(--error-text);
}

/* Modal Popup */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.modal-content label {
    display: block;
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 6px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #CCC;
    border-radius: 5px;
}

.modal-content button {
    margin-top: 1rem;
    padding: 10px;
    width: 100%;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.modal-content button[type="submit"] {
    background-color: var(--primary);
    color: white;
}

.submit-btn {
    background-color: crimson;
    color: #FFF;
}

.modal-content button:last-child {
    background-color: #e5e7eb;
    color: #333;
}


/* DropDown for multiple events */

#eventSelector {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid #CCC;
}

/* 
✅ Overlay Button CSS Logic

*/

.day-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.day:hover .day-overlay {
    display: flex;
}

.overlay-btn {
    background: var(--primary-dark);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.overlay-btn:hover {
    background: var(--primary);
}

