/**
 * SalatKu - Main Stylesheet (Cleaned & Fixed)
 * Removed conflicts + Added Pulsing Gold Effect
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--body-bg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    will-change: background;
    transition: all 0.8s ease-in-out;
}

/* Universal overlay for image backgrounds */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--shadow-color), var(--overlay-opacity)) 0%, rgba(var(--shadow-color), calc(var(--overlay-opacity) + 0.1)) 100%);
    z-index: -1;
    transition: all 0.8s ease-in-out;
}

/* Glass Morphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--shadow-color), 0.3);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--shadow-color), 0.05);
    padding: 8px;
    border-radius: 50px;
    border: 1px solid rgba(var(--shadow-color), 0.1);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 25px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.location-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(var(--shadow-color), 0.05);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid rgba(var(--shadow-color), 0.1);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.burger-line {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.burger-menu:hover .burger-line {
    background: var(--accent);
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transition: left 0.3s ease;
    z-index: 999;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    left: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.mobile-nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 18px;
    padding: 16px 20px;
    border-radius: 15px;
    transition: all 0.2s ease;
    background: rgba(var(--shadow-color), 0.05);
    border: 1px solid rgba(var(--shadow-color), 0.1);
    text-align: center;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--shadow-color), 0.1);
    color: var(--primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 70px;
    right: -350px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-height: 80vh;
    overflow-y: auto;
}

.settings-panel.open {
    right: 20px;
}

.settings-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bg-option {
    width: 100%;
    height: 60px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.bg-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.bg-option.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

.bg-option.active::after {
    opacity: 1;
}

.bg-option:hover {
    transform: scale(1.02);
}

.bg-section {
    margin-bottom: 24px;
}

.bg-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Section */
.hero {
    margin-top: 70px;
    padding: 20px 20px 30px;
    color: white;
    text-align: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: none;
}

/* Hero Overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 3;
    pointer-events: none;
}

/* Hero glass effect overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
    z-index: 4;
    pointer-events: none;
}

/* Hero background slideshow container */
.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

/* Individual hero slide */
.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1.05);
}

.hero-bg-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.hijri-date {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Amiri', serif;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.next-prayer {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px auto;
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.next-prayer-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.next-prayer-name {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900;
    margin-bottom: 8px;
    text-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.next-prayer-time {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Compact Countdown */
.countdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.countdown-number {
    font-size: 20px;
    font-weight: 900;
    display: block;
    margin-bottom: 4px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    font-family: 'Poppins', sans-serif;
}

.countdown-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zone-info {
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(20px);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.zone-info-title {
    margin-bottom: 4px;
    font-size: 11px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.zone-info-location {
    font-weight: 800;
    font-size: 14px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Content Grid - After Prayer Times */
.content-section {
    padding: 60px 20px;
}

.content-grid {
    background: rgba(var(--shadow-color), 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(var(--shadow-color), 0.3);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.content-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
    opacity: 0.8;
}

.quote-card, .info-card {
    padding: 32px 24px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, rgba(var(--shadow-color), 0.2), rgba(var(--shadow-color), 0.15));
    border: 1px solid rgba(var(--shadow-color), 0.4);
    backdrop-filter: blur(10px);
    color: white;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.quote-card:hover, .info-card:hover {
    transform: translateY(-6px) scale(1.03);
    background: linear-gradient(135deg, rgba(var(--shadow-color), 0.3), rgba(var(--shadow-color), 0.25));
    box-shadow: var(--shadow-md);
}

.quote-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 40px;
    color: var(--accent);
    opacity: 0.3;
    font-family: serif;
}

.quote-arabic {
    font-family: 'Amiri', serif;
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-accent);
    margin-bottom: 12px;
    direction: rtl;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.quote-translation {
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.quote-source {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(var(--shadow-color), 0.2);
    padding: 4px 8px;
    border-radius: 10px;
}

.info-card-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.compass {
    width: 65px;
    height: 65px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
    color: white;
    box-shadow: var(--shadow-sm);
    animation: compass-rotate 30s linear infinite;
    border: 3px solid rgba(var(--shadow-color), 0.4);
}

@keyframes compass-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.compass-direction {
    font-weight: 800;
    color: var(--text-accent);
    margin-bottom: 4px;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.compass-location {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.item-list {
    width: 100%;
}

.list-item {
    background: linear-gradient(135deg, rgba(var(--shadow-color), 0.15), rgba(var(--shadow-color), 0.1));
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--accent);
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--shadow-color), 0.2);
    backdrop-filter: blur(8px);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--shadow-color), 0.1);
}

.list-item:hover {
    background: linear-gradient(135deg, rgba(var(--shadow-color), 0.25), rgba(var(--shadow-color), 0.2));
    transform: translateX(6px) translateY(-2px);
    border-left: 4px solid var(--text-accent);
    box-shadow: var(--shadow-sm);
}

.mosque-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mosque-icon {
    font-size: 16px;
    color: var(--accent);
}

.mosque-info {
    flex: 1;
}

.mosque-name {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
    color: var(--text-accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mosque-distance {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.event-date {
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 4px;
    font-weight: 600;
}

.event-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 60px;
    font-weight: 500;
    padding: 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* ===== PRAYER ITEM OVERRIDES - PULSING GOLD EFFECT ===== */

/* Force Base Prayer Item Styles */
.prayer-item {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.prayer-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Completed Prayers */
.prayer-item.completed {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    opacity: 0.7 !important;
}

/* Next Prayer */
.prayer-item.next {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    transform: scale(1.05) !important;
}

.prayer-item.next:hover {
    transform: translateY(-4px) scale(1.08) !important;
}

/* CURRENT PRAYER - PULSING GOLD EFFECT */
.prayer-item.current,
.prayer-item.current:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    border: 3px solid #f59e0b !important;
    transform: scale(1.08) !important;
    animation: pulseGoldMain 2s ease-in-out infinite !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Pulsing Gold Animation */
@keyframes pulseGoldMain {
    0%, 100% { 
        border-color: #d97706 !important;
        box-shadow: 
            0 0 10px rgba(245, 158, 11, 0.3),
            0 6px 20px rgba(0, 0, 0, 0.25) !important;
    }
    50% { 
        border-color: #fbbf24 !important;
        box-shadow: 
            0 0 30px rgba(245, 158, 11, 0.8),
            0 0 50px rgba(245, 158, 11, 0.4),
            0 6px 20px rgba(0, 0, 0, 0.25) !important;
    }
}

/* Remove any conflicting pseudo elements */
.prayer-item.current::before,
.prayer-item.next::before {
    display: none !important;
}

/* Prayer Text Styles */
.prayer-name {
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prayer-time {
    font-weight: 900;
    font-size: 22px;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.prayer-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Status Colors */
.prayer-item.completed .prayer-status {
    color: #22c55e !important;
}

.prayer-item.next .prayer-status {
    color: #3b82f6 !important;
}

.prayer-item.current .prayer-status {
    color: #fbbf24 !important;
}

.prayer-item.upcoming .prayer-status {
    color: #ffffff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        padding: 12px 16px;
        justify-content: space-between;
    }

    /* Hide desktop nav and location */
    .nav-center,
    .location-display {
        display: none;
    }

    /* Show burger menu */
    .burger-menu {
        display: flex;
    }

    .hero {
        padding: 15px 20px 20px;
        min-height: 45vh;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .quote-card, .info-card {
        padding: 24px 16px;
    }

    .compass {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .info-card-title {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .quote-arabic {
        font-size: 16px;
    }

    .quote-translation {
        font-size: 12px;
    }

    .quote-source {
        font-size: 10px;
    }

    .settings-panel {
        width: calc(100vw - 40px) !important;
        right: -100vw !important;
    }

    .settings-panel.open {
        right: 20px !important;
    }

    /* Mobile Prayer Items */
    .prayer-item.current {
        border: 3px solid #f59e0b !important;
        animation: pulseGoldMain 2s ease-in-out infinite !important;
        transform: scale(1.05) !important;
    }
}

/* Desktop Prayer Items */
@media (min-width: 769px) {
    .prayer-item.current {
        border: 4px solid #f59e0b !important;
        animation: pulseGoldMain 2s ease-in-out infinite !important;
    }
}