:root {
    --primary-red: #E70013;
    --background: #fdfdfd;
    --card-bg: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #666;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    --border-radius: 16px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow-y: auto;
    font-family: 'Inter', 'Amiri', serif;
    background-color: var(--background);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    padding: 20px 0;
    direction: rtl;
}

/* Welcome Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.5s ease;
}

.welcome-content {
    padding: 2rem;
    animation: fadeIn 0.8s ease;
}

.welcome-logo {
    width: 120px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

#start-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 2rem;
    box-shadow: 0 10px 20px rgba(231, 0, 19, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* App Styles */
.app-container {
    width: 100%;
    max-width: 450px;
    min-height: 100%;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
}

.top-nav {
    display: flex;
    justify-content: flex-start;
}

#exit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
}

#exit-btn:hover {
    background: #f5f5f5;
    color: var(--primary-red);
}

header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.logo {
    width: 40px;
    margin-bottom: 0.3rem;
}

h1 {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    margin: 0;
    color: var(--primary-red);
}

.location-controls {
    margin-top: 0.5rem;
}

.search-row {
    display: flex;
    gap: 0.4rem;
}

#city-search {
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fdfdfd;
    font-size: 0.95rem;
    font-family: inherit;
}

#gps-btn {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 0 12px;
    cursor: pointer;
    color: var(--text-muted);
}

.current-info {
    text-align: center;
    margin: 0.5rem 0;
}

.date-container {
    margin-bottom: 0.2rem;
}

#hijri-date {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-red);
}

#gregorian-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#live-clock {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.prayer-times-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow: hidden;
}

.prayer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #f5f5f5;
    border-radius: 14px;
    transition: var(--transition);
}

.active.prayer-row {
    background: rgba(231, 0, 19, 0.04);
    border-color: var(--primary-red);
    box-shadow: inset 4px 0 0 var(--primary-red);
}

.prayer-name {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1rem;
}

.active .prayer-name {
    color: var(--primary-red);
}

.prayer-time {
    font-size: 1.1rem;
    font-weight: 700;
}

.bottom-info {
    margin-top: 0.5rem;
}

.next-prayer-card {
    background: linear-gradient(135deg, var(--primary-red), #b6000e);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
}

#next-prayer-label {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

#countdown {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

footer {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

footer p {
    margin: 2px 0;
}