:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(22, 27, 34, 0.6);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #f59e0b;
    /* Golden accent for Ramadan */
    --accent-hover: #d97706;
    --success-color: #238636;
    --error-color: #f85149;
    --error-bg: rgba(248, 81, 73, 0.1);
    --input-bg: rgba(1, 4, 9, 0.6);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: #f59e0b;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background animated globes */
.background-globes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out alternate;
}

.globe-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.5) 0%, rgba(245, 158, 11, 0) 70%);
    /* Golden */
    top: -150px;
    left: -100px;
}

.globe-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0) 70%);
    /* Emerald green */
    bottom: -200px;
    right: -150px;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
    z-index: 1;
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link i {
    width: 16px;
    height: 16px;
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-3px);
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff, #fcd34d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
}

.text-center {
    text-align: center;
}

/* Top Info Row */
.top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--panel-border);
}

.ramadan-day-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.moon-icon {
    width: 18px;
    height: 18px;
}

.district-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.district-toggle label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

select {
    appearance: none;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

select:focus {
    border-color: var(--accent-color);
}

.select-icon {
    position: absolute;
    right: 10px;
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* Countdown Display */
.countdown-display {
    margin: 3rem 0;
}

.countdown-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.time-huge {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.target-time-desc {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
}

/* Times Grid */
.times-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--panel-border);
}

.time-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition);
}

.time-box:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.03);
}

.time-box-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.time-box-label i {
    width: 16px;
    height: 16px;
}

.time-box-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Error Box */
.error-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--error-bg);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 8px;
    color: var(--error-color);
    margin-top: 1.5rem;
    font-size: 0.95rem;
    animation: slideIn 0.3s ease-out;
}

.error-box.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .glass-panel {
        padding: 2rem 1.5rem;
    }

    .title {
        font-size: 2.25rem;
    }

    .time-huge {
        font-size: 3.5rem;
    }

    .top-info {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .district-toggle {
        justify-content: center;
    }
}

/* Decorative SVGs */
.decor-left,
.decor-right {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

.decor-left {
    top: 50%;
    left: 4vw;
    transform: translateY(-50%);
    animation: sway 6s ease-in-out infinite alternate;
}

.decor-right {
    top: 10%;
    right: 4vw;
    animation: sway-lantern 8s ease-in-out infinite alternate;
    transform-origin: top center;
}

@keyframes sway {
    0% {
        transform: translateY(-50%) rotate(-3deg);
    }

    100% {
        transform: translateY(-50%) rotate(3deg);
    }
}

@keyframes sway-lantern {
    0% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(5deg);
    }
}

@media (max-width: 1024px) {
    .decor-left {
        left: -60px;
        opacity: 0.4;
    }

    .decor-right {
        right: -50px;
        opacity: 0.4;
    }
}

@media (max-width: 768px) {

    .decor-left,
    .decor-right {
        display: none;
    }
}