:root {
    --bg-base: #020604;
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Advanced Mesh Background --- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
    filter: blur(60px);
    animation: breathe 10s ease-in-out infinite alternate;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

@keyframes breathe {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Floating Navbar --- */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 800px;
    background: rgba(10, 20, 15, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 12px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: navSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes navSlideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 100vh;
    padding-top: 100px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 32px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 500px;
    line-height: 1.7;
}

/* --- Buttons --- */
.cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: #020604;
    border: none;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.5);
    background: #34d399;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.icon { width: 20px; height: 20px; }

/* --- 3D Widget Mockup --- */
.hero-visual {
    position: relative;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 550px;
}

/* The glow behind the widget */
.hero-visual::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 60%);
    filter: blur(40px);
    z-index: -1;
}

.widget-mockup {
    width: 360px;
    height: 520px;
    background: rgba(4, 20, 14, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: rotateY(-18deg) rotateX(8deg) translateZ(0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    overflow: hidden;
}

.widget-mockup:hover {
    transform: rotateY(-5deg) rotateX(2deg) translateZ(20px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(16, 185, 129, 0.2);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.mockup-actions { display: flex; gap: 8px; }

.mockup-actions .dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.mockup-actions .dot:nth-child(1) { background: #ef4444; }
.mockup-actions .dot:nth-child(2) { background: #eab308; }
.mockup-actions .dot:nth-child(3) { background: #22c55e; }

.mockup-body { padding: 24px 20px; }

.next-prayer { text-align: center; margin-bottom: 24px; }

.n-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.n-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 8px 0;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.n-time {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.n-countdown {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin: 12px 0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.n-sec { font-size: 1.2rem; color: var(--text-muted); }

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, var(--primary), #34d399);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.location-pill {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timetable { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    height: 180px; /* Force height so we can mask the bottom */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.pr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    transition: all 0.2s;
}

.pr-row:hover { background: rgba(255, 255, 255, 0.05); }

.pr-row.active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #fff;
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);
}

.pr-left, .pr-right { display: flex; align-items: center; gap: 10px; }

.badge-small {
    font-size: 0.65rem;
    background: rgba(16, 185, 129, 0.2);
    padding: 4px 8px;
    border-radius: 100px;
    color: var(--primary);
    font-weight: 700;
}

.dot-active {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* --- Features Section --- */
.features {
    padding: 80px 0 120px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px 32px;
    border-radius: 24px;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Card hover glow effect */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before { opacity: 1; }

.icon-box {
    width: 56px; height: 56px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.3rem; margin-bottom: 12px; font-weight: 700;
}

.feature-card p {
    color: var(--text-muted); font-size: 1rem; line-height: 1.6;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 48px 0;
    background: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}

footer p { color: var(--text-muted); font-size: 0.95rem; }
footer a { color: var(--text-main); font-weight: 600; text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid rgba(255,255,255,0.2); transition: all 0.2s;}
footer a:hover { color: var(--primary); border-color: var(--primary); }

/* --- Animations --- */
.fade-in-up {
    opacity: 0; transform: translateY(30px);
    animation: fadeInUp 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

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

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 968px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 140px; gap: 60px;}
    .hero h1 { font-size: 3rem; }
    .hero p { margin: 0 auto 40px; }
    .cta-group { justify-content: center; }
    .features-grid { grid-template-columns: 1fr; }
    .widget-mockup { transform: none !important; }
}
@media (max-width: 480px) {
    .btn { width: 100%; }
    .hero h1 { font-size: 2.2rem; }
}
