:root {
    --gold: #FFD700;
    --gold-dim: #C5A000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #0f172a;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95)),
        url('../img/program.png');
    /* Adjusted path for CSS file location */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 30px;
}

.app-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.app-logo i {
    font-size: 32px;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Top Bar (Location) */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens if needed, though media query handles column */
    gap: 20px;
    margin-bottom: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
    width: 100%;
    /* Ensure it fits container */
}

.location-select {
    flex: 1;
    position: relative;
}

.location-select select,
.location-select input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 15px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    appearance: none;
    outline: none;
}

.location-select i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.location-select input {
    padding-left: 40px;
}

/* Specific styling for the Find Location button to match input style */
#btn-find-location {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 15px;
    /* Matches input padding */
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center content */
    transition: all 0.3s ease;
    height: 46px;
    /* Explicit height to match input usually */
    box-sizing: border-box;
}

#btn-find-location:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold);
}

#btn-find-location i {
    position: static;
    /* Reset absolute positioning from .location-select i */
    transform: none;
    margin-right: 10px;
    color: var(--gold);
}

#btn-find-location span {
    color: white !important;
    /* Force white text */
}

/* Main Card */
.main-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.location-title {
    font-size: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.next-vakit-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.next-vakit-name-home {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    margin: 0;
    line-height: 1.2;
}

.next-vakit-name {
    font-size: 48px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    margin: 0;
    line-height: 1.2;
}

.next-vakit-time {
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
    display: block;
}

.countdown-timer {
    font-size: 80px;
    font-weight: 700;
    background: linear-gradient(180deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 10px 0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.countdown-labels {
    display: flex;
    justify-content: center;
    gap: 60px;
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.countdown-labels span {
    width: 80px;
}

.current-date {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 40px;
}

/* Prayer Times Grid */
.vakit-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 columns for 6 times */
    gap: 15px;
    margin-top: 20px;
}

.vakit-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.vakit-item span:first-child {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.vakit-item .time {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.vakit-item.active {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.vakit-item.active span:first-child {
    color: var(--gold);
}

.vakit-item.active .time {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .countdown-timer {
        font-size: 48px;
    }

    .countdown-labels {
        gap: 20px;
    }

    .countdown-labels span {
        width: 40px;
    }

    .vakit-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .top-bar {
        flex-direction: column;
    }
}

/* Sidebar Ads */
.sidebar-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 10;
}

.left-ad {
    left: 20px;
}

.right-ad {
    right: 20px;
}

/* Hide sidebars on smaller screens */
@media (max-width: 1300px) {
    .sidebar-ad {
        display: none;
    }
}