/* Premium Pixel-Like Glow Theme - Deep Navy */
:root {
    --primary-blue: #0A111F;
    /* Dark slate navy */
    --secondary-blue: #111A2E;
    --accent-cyan: #14B8A6;
    --glass-bg: rgba(17, 26, 46, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --gold: #FACC15;
    --gold-light: #FEF08A;
    --text-white: #ffffff;
    --text-grey: #94A3B8;
    --jamaat-cyan: #2DD4BF;
    --transition: all 0.3s ease;

    --font-arabic: 'Amiri', serif;
    --font-main: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-blue);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(45, 212, 191, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(250, 204, 21, 0.05) 0%, transparent 40%);
    color: var(--text-white);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Mosque Background */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('mosque_silhouette.png');
    background-size: cover;
    background-position: center bottom;
    opacity: 0.12;
    z-index: -1;
}

header {
    height: 12vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4vw;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.masjid-info {
    display: flex;
    align-items: center;
    gap: 1.5vw;
}

.masjid-logo {
    width: 4vw;
    height: 4vw;
    min-width: 60px;
    min-height: 60px;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2vw;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.masjid-title h1 {
    font-size: 2.5vw;
    color: var(--gold);
    letter-spacing: 1px;
}

.masjid-title p {
    font-size: 1vw;
    color: var(--text-grey);
}

.header-datetime {
    display: flex;
    gap: 3vw;
    text-align: right;
}

.date-item h2 {
    font-size: 1.8vw;
    color: var(--text-white);
}

.date-item p {
    font-size: 0.8vw;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

main {
    flex: 1;
    padding: 2vh 3vw;
    display: flex;
    gap: 2vw;
    overflow: hidden;
}

.prayer-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

/* Banner */
.next-prayer-banner {
    height: 16vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4vw;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.np-left {
    display: flex;
    flex-direction: column;
}

.np-header {
    font-size: 1vw;
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5vh;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.np-main {
    display: flex;
    align-items: center;
    gap: 1.5vw;
}

.np-icon {
    width: 4.5vw;
    height: 4.5vw;
    background-size: contain;
    background-repeat: no-repeat;
}

.np-name {
    font-size: 5vw;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
}

.np-time {
    font-size: 1.2vw;
    color: var(--text-grey);
    margin-top: 0.5vh;
    font-weight: 500;
}

.np-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.np-countdown {
    font-size: 5.5vw;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -2px;
    line-height: 1;
}

.np-progress-bg {
    width: 20vw;
    height: 1vh;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    margin-top: 1.5vh;
    margin-left: auto;
    overflow: hidden;
}

.np-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--accent-green));
    box-shadow: 0 0 15px var(--gold);
    transition: width 1s linear;
}

/* Grid */
.prayer-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.2vw;
    flex: 1;
}

.prayer-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 3vh 1vw;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.prayer-card.active {
    background: rgba(250, 204, 21, 0.03);
    border: 1px solid var(--gold);
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.15);
    transform: translateY(-5px);
}

.prayer-card.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--gold);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    box-shadow: 0 0 10px var(--gold);
}

.prayer-label {
    font-size: 0.7vw;
    font-weight: 700;
    color: var(--text-grey);
    letter-spacing: 2px;
    margin-bottom: 0.8vh;
}

.prayer-arabic {
    font-family: var(--font-arabic);
    font-size: 2vw;
    color: var(--gold-light);
    margin-bottom: 1.5vh;
}

.adhan-time {
    font-size: 2.8vw;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2.5vh;
    line-height: 1;
}

.jamaat-section {
    border-top: 1px dotted rgba(255, 255, 255, 0.08);
    padding-top: 2vh;
}

.jamaat-label {
    font-size: 0.6vw;
    color: var(--text-grey);
    letter-spacing: 1px;
    margin-bottom: 0.5vh;
}

.jamaat-time {
    font-size: 2.2vw;
    font-weight: 700;
    color: var(--jamaat-cyan);
}

.prayer-icon {
    width: 3vw;
    height: 3vw;
    min-width: 40px;
    min-height: 40px;
    margin: 0 auto 1.5vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.3));
}

/* High Quality Clean Embedded SVGs that mimic the pixel layout style perfectly */
#card-fajr .prayer-icon {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FACC15'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}

#card-sunrise .prayer-icon {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FACC15' d='M12 4a8 8 0 0 1 8 8H4a8 8 0 0 1 8-8z'/%3E%3Crect x='2' y='13' width='20' height='3' fill='%232DD4BF' rx='1'/%3E%3C/svg%3E");
}

#card-dhuhr .prayer-icon {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FACC15'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M4.93 19.07l1.41-1.41m11.32-11.32l1.41-1.41' stroke='%23FACC15' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

#card-asr .prayer-icon {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='16' cy='8' r='4' fill='%23FACC15'/%3E%3Cpath fill='%23ffffff' d='M17.5 19c2.5 0 4.5-2 4.5-4.5S20 10 17.5 10c-.39 0-.77.05-1.12.14C15.42 7.72 13.06 6 10.5 6 6.91 6 4 8.91 4 12.5c0 .35.03.69.08 1.02C2.31 14.1 1 15.65 1 17.5 1 19.43 2.57 21 4.5 21h13v-2z'/%3E%3C/svg%3E");
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

#card-maghrib .prayer-icon {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='%23F59E0B'/%3E%3Crect x='2' y='14' width='20' height='2' fill='%23FACC15' rx='1'/%3E%3C/svg%3E");
}

#card-isha .prayer-icon {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FACC15'%3E%3Cpath d='M12.34 2.02A9 9 0 0 0 2 11c0 4.97 4.03 9 9 9 3.06 0 5.76-1.53 7.39-3.86a6 6 0 0 1-5.69-5.91 6 6 0 0 1 1.3-3.77A8.99 8.99 0 0 0 12.34 2.02z'/%3E%3Ccircle cx='18' cy='4' r='1.5'/%3E%3Ccircle cx='21' cy='9' r='1'/%3E%3C/svg%3E");
}

/* Sidebar */
.sidebar {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    gap: 2.5vh;
}

.panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5vh 1.5vw;
}

.panel-title {
    font-size: 1vw;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1.5vh;
    display: flex;
    align-items: center;
    gap: 0.8vw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1vh;
}

.news-board {
    height: 100%;
    overflow-y: auto;
}

.news-item {
    padding: 1.2vh 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: flex-start;
    gap: 0.8vw;
}

.news-tag {
    padding: 0.2vh 0.6vw;
    background: var(--gold);
    color: var(--primary-green);
    border-radius: 4px;
    font-size: 0.6vw;
    font-weight: 800;
    text-transform: uppercase;
}

.news-text {
    font-size: 0.9vw;
    line-height: 1.4;
}

/* Ticker Footer */
footer {
    height: 8vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-wrap {
    width: 100%;
    display: flex;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 90s linear infinite;
}

.ticker-item {
    padding: 0 5vw;
    display: flex;
    align-items: center;
    gap: 2vw;
}

.ticker-item .arabic {
    font-family: var(--font-arabic);
    font-size: 2.2vw;
    color: #fff;
}

.ticker-item .tamil {
    font-size: 1.3vw;
    color: var(--gold);
    font-weight: 500;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Control Buttons */
.ctrl-btns {
    position: fixed;
    bottom: 10vh;
    right: 2vw;
    display: flex;
    gap: 1vw;
    z-index: 100;
}

.btn-icon {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--gold);
    width: 3vw;
    height: 3vw;
    min-width: 45px;
    min-height: 45px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2vw;
}

.btn-icon:hover {
    background: var(--gold);
    color: var(--primary-green);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Mobile & Tablet Compatibility */
@media screen and (max-width: 1024px) {
    header {
        height: auto;
        padding: 2vh 4vw;
        flex-direction: column;
        gap: 2vh;
        text-align: center;
    }

    .masjid-info {
        flex-direction: column;
    }

    .header-datetime {
        align-items: center;
    }

    .masjid-title h1 {
        font-size: 6vw;
    }

    .date-item h2 {
        font-size: 4vw;
    }

    main {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
        padding: 2vh 5vw;
    }

    .prayer-section {
        flex: none;
        width: 100%;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }

    .next-prayer-banner {
        height: auto;
        padding: 4vh 5vw;
        flex-direction: column;
        gap: 3vh;
        text-align: center;
        border-radius: 30px;
    }

    .np-header {
        font-size: 4vw;
        margin-bottom: 0.5vh;
    }

    .np-right {
        text-align: center;
    }

    .np-progress-bg {
        width: 80%;
        margin: 2vh auto;
    }

    .np-name {
        font-size: 12vw;
    }

    .np-countdown {
        font-size: 15vw;
    }

    .prayer-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 4vw;
    }

    .prayer-card {
        padding: 4vh 2vw;
        border-radius: 25px;
    }

    .prayer-arabic {
        font-size: 6vw;
    }

    .adhan-time {
        font-size: 8vw;
    }

    .jamaat-time {
        font-size: 6vw;
    }

    .prayer-icon {
        width: 12vw;
        height: 12vw;
    }

    footer {
        height: 10vh;
    }

    .ticker-item .arabic {
        font-size: 5vw;
    }

    .ticker-item .tamil {
        font-size: 3.5vw;
    }

    .ctrl-btns {
        bottom: 12vh;
        position: fixed;
    }

    body {
        overflow-y: auto;
        height: auto;
    }
}

@media screen and (max-width: 480px) {
    .prayer-cards {
        grid-template-columns: 1fr;
    }

    .masjid-title h1 {
        font-size: 8vw;
    }

    .np-name {
        font-size: 15vw;
    }

    .np-countdown {
        font-size: 18vw;
    }
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}