:root {
    --accent-color: #f5f5f5;
    --text-color: #333;
    --highlight-color: #f48024;
    --fajr-color: #576CBC;
    --sunrise-color: #E48F45;
    --dhuhr-color: #F2BE22;
    --asr-color: #5C8374;
    --maghrib-color: #9A3B3B;
    --isha-color: #2D3250;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
    color: var(--text-color);
}

.prayer-card.show-False {
    display: none;
}

.header {
    flex-shrink: 0;
    height: 13vh;
    min-height: 70px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0 2vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    width: clamp(50px, 7vw, 90px);
    height: auto;
    max-height: 10vh;
}

.name {
    font-size: clamp(1.2rem, 5vmin, 5rem);
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.date-time {
    text-align: right;
    font-size: clamp(1.2rem, 5vmin, 4rem);
}

.date-time .date {
    font-size: clamp(1.2rem, 3vmin, 4rem);
}

.ampm {
    font-size: clamp(0.6rem, 1.5vw, 0.9rem);
    color: inherit;
    margin-left: 0.5ch;
}

.container {
    flex: 1 1 auto;
    display: flex;
    overflow-y: hidden;
    width: 100%;
    padding: 1vh 1vw;
}

.prayer-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    background: white;
}

.prayer-card-header {
    padding: 2vmin;
    color: white;
    text-align: center;
    font-weight: bold;
    flex-shrink: 0;
}

.Fajr .prayer-card-header {
    background-color: var(--fajr-color);
}

.Sunrise .prayer-card-header {
    background-color: var(--sunrise-color);
}

.Dhuhr .prayer-card-header {
    background-color: var(--dhuhr-color);
}

.Asr .prayer-card-header {
    background-color: var(--asr-color);
}

.Maghrib .prayer-card-header {
    background-color: var(--maghrib-color);
}

.Isha .prayer-card-header {
    background-color: var(--isha-color);
}

.time-container {
    padding: 0.5vmin 0;
    background-color: white;
    text-align: center;
    flex-shrink: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.time-label {
    font-weight: bold;
    margin-bottom: 0.25vmin;
    color: var(--text-color);
    line-height: 1.2;
}

.time-value {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5vmin;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-prayer {
    box-shadow: 0 0 20px var(--highlight-color), 0 0 0 3px var(--highlight-color);
    transform: scale(1.02);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px;
    z-index: 1000;
    font-size: clamp(1.5rem, 2.5vw, 5rem);
    justify-content: center;
    align-items: center;
    animation: pulse 2s infinite;
    display: none;
}

.modal.active {
    display: flex;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .container {
        overflow-y: visible;
        height: auto;
        padding: 2vw 4vw;
    }

    .header {
        height: auto;
        min-height: 10vh;
        padding: 2vh 3vw;
        flex-direction: column;
        gap: 1vh;
        text-align: center;
    }

    .logo {
        width: clamp(60px, 18vw, 100px);
        order: 1;
    }

    .name {
        position: static;
        transform: none;
        font-size: clamp(1.3rem, 5vw, 1.8rem);
        max-width: 90%;
        order: 2;
    }

    .date-time {
        text-align: center;
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        order: 3;
        width: 100%;
    }

    .date-time .date {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .time-label {
        font-size: clamp(0.8rem, 3vmin, 1rem);
    }

    .time-value {
        font-size: clamp(1.6rem, 5vmin, 2.4rem);
    }
}
