* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html, body {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: rgb(20, 20, 20); 
    color: white;
    display: flex;
    flex-direction: column;
}

.ramadan-banner {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    margin-top: 10px;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 215, 0, 1);
    }
}

#loadingAnim {
    font-family: monospace;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.navbar {
    background-color: #000;
    color: white;
    height: 60px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.view-counter {
    font-size: 1.2rem;
}

.view-counter svg {
    width: 24px;
    height: 24px;
    display: block;
}

#timetableDisplay {
    margin-top: 2rem;
    background-color: #222; 
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2); 
    overflow-x: auto;
    width: 100%;
    border: 1px solid #FFD700; 
}

thead{
    text-align:left;
}

.timetable-table {
    width: 100%;
    border-collapse: collapse;
    color: white; 
}

.timetable-table th {
    background-color: #111; 
    color: #FFD700; 
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid #FFD700;
}

.timetable-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #444; 
    word-wrap: break-word;
}

.timetable-table tr:hover {
    background-color: rgba(255, 215, 0, 0.1); 
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    color: #FFD700;
}

select {
    padding: 0.75rem;
    border: 1px solid #FFD700;
    border-radius: 6px;
    background-color: rgb(30, 30, 30);
    color: white;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.6);
}

button {
    background-color: #FFD700;
    color: black;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    width: fit-content;
}

button:hover {
    background-color: #ffcc00;
    transform: scale(1.05);
}

.contact-info {
    margin-top: 1rem;
    font-size: 1rem;
}

.contact-info a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

.contact-info a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.contact-info span {
    margin: 0 0.5rem;
    color: #FFD700;
}

.contact-info-group {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.contact-info-group a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

.contact-info-group a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.contact-info-group span {
    color: #FFD700;
}

.footer-privacy-link-row {
    margin-top: 1.2rem;
    text-align: center;
}

.footer-privacy-link-row a {
    color: #FFD700;
    text-decoration: underline;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.footer-privacy-link-row a:hover {
    color: #ffcc00;
}

.strikethrough {
    text-decoration: line-through;
    color: #888;
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    background-color: #222; 
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.sidenav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #FFD700; 
    display: block;
}

.sidenav a:hover {
    color: #fff;
}

.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

@media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #000; 
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.loading-container .spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-width: 4px;
    border-color: #FFD700;      
    border-top-color: #000;     

}

.footer {
    background-color: #000;
    padding: 1rem 0;
    text-align: center;
    color: #ffffff;
    width: 100%;
    margin-top: auto;
}

.section-separator {
    margin: 2.5rem 0 2rem 0;
    border: none;
    border-top: 2px solid #FFD700;
    width: 100%;
}

.info-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-sections-vertical {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-card {
    background: #181818;
    border: 1px solid #FFD700;
    border-radius: 8px;
    padding: 1.5rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.07);
}

.info-card h2 {
    color: #FFD700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.info-card ul {
    margin-left: 1.2rem;
    margin-bottom: 0;
}

.info-card p {
    margin-bottom: 0;
}

#privacy-link, #footer-privacy-link {
    color: #FFD700;
    text-decoration: underline;
    cursor: pointer;
}

#privacy-link:hover, #footer-privacy-link:hover {
    color: #ffcc00;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #181818;
    border: 2px solid #FFD700;
    border-radius: 14px;
    padding: 2rem 2.5rem;
    max-width: 600px;
    width: 95%;
    max-height: 80vh;
    color: #fff;
    box-shadow: 0 4px 24px rgba(255,215,0,0.15);
    position: relative;
    text-align: left;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #FFD700 #222;
}

.modal-content h2 {
    color: #FFD700;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
}

.modal-content h3 {
    color: #FFD700;
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.7rem;
    font-weight: 600;
    border-bottom: 1px solid #FFD700;
    padding-bottom: 0.3rem;
}

.modal-content p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.modal-content ol {
    margin-left: 1.2rem;
    margin-bottom: 1.2rem;
    padding-left: 0.5rem;
}

.modal-content ol li {
    margin-bottom: 0.7rem;
    font-size: 1rem;
    line-height: 1.5;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 2rem;
    color: #FFD700;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
    z-index: 2;
}

.close-modal:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .modal-content {
        max-width: 98vw;
        padding: 1.2rem 0.8rem;
        font-size: 0.97rem;
    }
    .modal-content h2 {
        font-size: 1.2rem;
    }
    .modal-content h3 {
        font-size: 1rem;
    }
    .contact-info-group {
        flex-direction: column;
        gap: 0.3rem;
    }
    .footer-privacy-link-row {
        margin-top: 1.5rem;
    }
}

@media (min-width: 768px) {
    .navbar {
        justify-content: center;
        position: relative;
    }

    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .view-counter {
        position: absolute;
        right: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    #timetableDisplay {
        margin: 2rem -1rem;
        width: calc(100% + 2rem);
        border-radius: 0;
    }

    .timetable-table {
        table-layout: auto;
    }

    .timetable-table th,
    .timetable-table td {
        min-width: 120px;
        padding: 0.75rem;
    }
}