@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #c19a6b;
    --accent: #1a4d4a;
    --bg-dark: #0a1110;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --gold-gradient: linear-gradient(135deg, #c19a6b 0%, #8b6b43 100%);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.content-bg {
    filter: brightness(0.4) blur(5px);
}

.bg-overlay {
    background: radial-gradient(circle at center, rgba(26, 77, 74, 0.2) 0%, rgba(10, 17, 16, 0.9) 100%);
}

/* Premium Navigation */
.site-top {
    background: transparent;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.site-header img {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(193, 154, 107, 0.5));
}

/* Hero Section */
.hero-section {
    padding-top: 150px;
    padding-bottom: 60px;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 40px;
}

/* Countdown Card */
.countdown-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeIn 1s ease-out;
}

.countdown-title {
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.timer-item {
    text-align: center;
}

.timer-val {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.timer-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
}

/* Imsakiye Select Card Style */
.location-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.btn-modern {
    background: var(--gold-gradient);
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(193, 154, 107, 0.4);
    opacity: 0.9;
}

.btn-location {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
    margin-bottom: 25px;
}

.btn-location:hover {
    background: var(--primary);
    color: white !important;
}

.form-control-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 10px;
    padding: 12px;
    height: auto;
}

.form-control-modern:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: none;
    color: white;
}

.form-control-modern option {
    background: #131c1b !important;
    color: white !important;
    padding: 10px;
}

.form-control-modern option:hover,
.form-control-modern option:checked {
    background: var(--primary) !important;
    color: white !important;
}

/* For better browser compatibility */
select.form-control-modern {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c19a6b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

#outView {
    margin-top: 40px;
    padding-bottom: 100px;
}

#outViewPanel {
    line-height: 0;
    margin: 0 auto;
    padding: 0;
    max-width: 1000px;
}

#outViewPanel>div {
    border-radius: 15px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    display: block;
    margin: 0 auto;
    overflow: hidden;
}

#outViewPanel canvas {
    border-radius: 15px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Dashboard Elements */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

.prayer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.prayer-table tr {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    transition: transform 0.2s;
}

.prayer-table tr:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.1);
}

.prayer-table td {
    padding: 15px 20px;
    font-weight: 500;
}

.prayer-table td:first-child {
    border-radius: 12px 0 0 12px;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.prayer-table td:last-child {
    border-radius: 0 12px 12px 0;
    text-align: right;
    font-size: 1.2rem;
    font-weight: 700;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: var(--gold-gradient);
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    height: fit-content;
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-title i {
    color: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Landing Page Specific */
.landing-hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    animation: fadeIn 1s ease-out;
}

.landing-tag {
    background: var(--gold-gradient);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(193, 154, 107, 0.2);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
    width: 100%;
    max-width: 1100px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 24px;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 25px;
    display: block;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
}

.cta-container {
    margin-top: 60px;
    animation: float 4s ease-in-out infinite;
}

.btn-xl {
    padding: 22px 70px;
    font-size: 1.4rem;
    border-radius: 100px;
    font-weight: 700;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .landing-hero {
        min-height: 70vh;
        padding-top: 100px;
    }

    .feature-grid {
        gap: 20px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .btn-xl {
        width: 100%;
        padding: 18px 30px;
        font-size: 1.1rem;
    }

    .hero-section {
        padding-top: 120px;
    }
}

/* --- Premium Qibla Compass --- */
.qibla-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
}

.compass-base {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(193, 154, 107, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
    border-radius: 50%;
    border: 3px solid var(--glass-border);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(193, 154, 107, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.compass-ring-outer {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px solid rgba(193, 154, 107, 0.2);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.compass-point {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray);
    width: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.point-n {
    top: 5px;
    left: calc(50% - 10px);
    color: #ff5e57;
}

.point-e {
    top: calc(50% - 10px);
    right: 5px;
}

.point-s {
    bottom: 5px;
    left: calc(50% - 10px);
}

.point-w {
    top: calc(50% - 10px);
    left: 5px;
}

.degree-marks {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: repeating-conic-gradient(from 0deg, var(--glass-border) 0deg 0.5deg, transparent 0.5deg 5deg);
    border-radius: 50%;
    mask-image: radial-gradient(circle, transparent 45%, black 46%);
    -webkit-mask-image: radial-gradient(circle, transparent 45%, black 46%);
}

.qibla-destination {
    position: absolute;
    width: 32px;
    height: 32px;
    background: #000;
    border: 1.5px solid var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary);
    z-index: 5;
    transition: all 0.5s ease;
    transform-origin: center center;
}

.kaba-icon {
    width: 18px;
    height: 18px;
    background: var(--gold-gradient);
    border-radius: 1px;
    position: relative;
}

.kaba-icon::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
}

.needle-premium {
    position: absolute;
    width: 2px;
    height: 75px;
    background: rgba(255, 255, 255, 0.1);
    transform-origin: bottom center;
    bottom: 50%;
    z-index: 10;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.needle-premium::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -6px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 22px solid var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
}

.needle-center {
    width: 14px;
    height: 14px;
    background: #000;
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 11;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

@keyframes qibla-glow {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.qibla-destination {
    animation: qibla-glow 2s infinite ease-in-out;
}

@media (max-width: 768px) {
    .btn-location {
        font-size: 0.8rem !important;
        /* Smaller text for button */
        padding: 15px 5px !important;
        white-space: normal !important;
        /* Allow controlled wrapping if needed, or keep smaller */
        line-height: 1.2;
    }

    /* Make the button icon smaller too */
    .btn-location i {
        font-size: 1rem;
    }

    .hero-section {
        padding-top: 180px !important;
        padding-bottom: 20px !important;
    }

    .hero-title {
        font-size: 2.2rem !important;
    }

    .landing-tag {
        margin-bottom: 15px !important;
    }
}

/* Ensure desktop padding is sufficient globally if not overridden */
.hero-section {
    padding-top: 200px;
}