/* style.css - Restoration to Pristine Working State */

:root {
    --bg-color: #ffffff;
    --bg-grad: linear-gradient(135deg, #ffffff 0%, #eadcbf 100%);
    --text-dark: #1a2982;
    --text-dark-light: #2c3ea7;
    --gold: #b8860b;
    --gold-light: #ecc132;
    --gold-grad: linear-gradient(135deg, #a16207 0%, #d97706 45%, #78350f 100%);
    --gold-glow: rgba(184, 134, 11, 0.15);
    
    --text-light: #1f2937;
    --text-muted: #6b7280;
    
    --card-bg: #ffffff;
    --card-border: rgba(236, 193, 50, 0.22);
    --card-border-active: rgba(77, 205, 196, 0.55);
    
    --error: #ef4444;
    --success: #4dcdc4;
    
    --font-main: 'Tajawal', 'Readex Pro', sans-serif;
    --font-serif: 'Amiri', serif;
    
    --accent: #1a2982;
    --accent-light: #ecc132;
    --accent-dark: #101c60;
    --accent-glow: rgba(26, 41, 130, 0.12);
}

body.dark-theme {
    --bg-color: #0f172a;
    --bg-grad: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --text-dark: #f8fafc;
    --text-dark-light: #cbd5e1;
    --text-muted: #94a3b8;
    
    --card-bg: #1e293b;
    --card-border: rgba(236, 193, 50, 0.3);
    
    --gold: #ecc132;
    --gold-glow: rgba(236, 193, 50, 0.25);
}

/* Prayer Atmospheric Themes */
body.theme-fajr {
    --bg-color: #0f172a;
    --bg-grad: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0f172a 70%, #020617 100%);
    --card-bg: rgba(30, 27, 75, 0.85);
    --text-dark: #ffffff !important;
    --text-muted: #cbd5e1 !important;
    --gold: #f59e0b;
}

body.theme-dhuhr {
    --bg-color: #fafaf7;
    --bg-grad: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #fafaf7 65%, #f1f5f9 100%);
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #0f172a !important;
    --text-muted: #475569 !important;
    --gold: #d4af37;
}

body.theme-asr {
    --bg-color: #fef3c7;
    --bg-grad: radial-gradient(circle at 50% 0%, #fde68a 0%, #fef3c7 65%, #fdf4e3 100%);
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #0f172a !important;
    --text-muted: #475569 !important;
    --gold: #b45309;
}

body.theme-maghrib {
    --bg-color: #31121f;
    --bg-grad: radial-gradient(circle at 50% 0%, #4c1d95 0%, #31121f 70%, #180910 100%);
    --card-bg: rgba(76, 29, 149, 0.82);
    --text-dark: #ffffff !important;
    --text-muted: #cbd5e1 !important;
    --gold: #f43f5e;
}

body.theme-isha {
    --bg-color: #030712;
    --bg-grad: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #030712 70%, #000000 100%);
    --card-bg: rgba(17, 24, 39, 0.85);
    --text-dark: #ffffff !important;
    --text-muted: #cbd5e1 !important;
    --gold: #818cf8;
}

/* Reset & Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-color);
    background-image: var(--bg-grad);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

.hidden {
    display: none !important;
}

.gold-text {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}


/* Sticky Navbar */
.app-navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1.5px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    object-fit: cover;
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold);
    background: rgba(236, 193, 50, 0.12);
}

.lang-selector-wrap {
    display: flex;
    align-items: center;
}

.lang-select {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

body.dark-theme .lang-select {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.lang-select:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 12px var(--gold-glow);
}

.btn-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--card-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* App Container */
.app-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 30px 20px 60px 20px;
    position: relative;
    z-index: 1;
}

/* Landing Section */
.landing-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: center;
    padding: 40px 30px;
    margin-bottom: 35px;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.atmospheric-mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(236, 193, 50, 0.15);
    border: 1px solid rgba(236, 193, 50, 0.3);
    color: var(--gold);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.btn-start-test {
    padding: 16px 36px;
    font-size: 1.25rem;
    font-weight: 900;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(184, 134, 11, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-start-test * {
    pointer-events: none;
}

.btn-start-test:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--gold-glow);
}

.mosque-illustration-container {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--gold);
    box-shadow: 0 12px 30px var(--gold-glow);
}

.mosque-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Organized Landing Page Info Cards */
.benefits-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.benefit-card {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 8px 25px var(--gold-glow);
}

.benefit-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(236, 193, 50, 0.12);
    border: 1.5px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.benefit-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.benefit-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.info-section {
    padding: 30px;
    border-radius: 24px;
}

.info-header-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.info-header-icon {
    font-size: 1.5rem;
}

.info-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-dark);
}

.info-text {
    font-size: 0.98rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 22px;
    opacity: 0.9;
}

.about-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.pillar-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px;
}

body.dark-theme .pillar-item {
    background: rgba(255, 255, 255, 0.04);
}

.pillar-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.pillar-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pillar-info strong {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-dark);
}

.pillar-info span {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* How it works 3-Step Guide */
.how-it-works-section {
    padding: 30px;
    border-radius: 24px;
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.step-guide-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1.5px solid var(--card-border);
    border-radius: 18px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

body.dark-theme .step-guide-card {
    background: rgba(255, 255, 255, 0.04);
}

.step-guide-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--gold-glow);
}

.step-guide-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold-grad);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px var(--gold-glow);
}

.step-guide-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-guide-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Gender Step View */
.gender-step-view {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.gender-step-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.gender-step-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.gender-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.gender-choice-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.gender-choice-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 12px 30px var(--gold-glow);
}

.gender-card-icon { font-size: 3rem; margin-bottom: 12px; }
.gender-card-title { font-size: 1.3rem; font-weight: 900; color: var(--text-dark); margin-bottom: 8px; }
.gender-card-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.gender-card-action {
    display: inline-flex;
    padding: 8px 20px;
    border-radius: 12px;
    background: var(--gold);
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 800;
}

/* WIZARD STEPPER & NODES (HORIZONTAL FULL WIDTH ALIGNMENT) */
.wizard-section {
    max-width: 820px;
    margin: 0 auto;
}

.wizard-progress-bar {
    position: relative;
    padding: 22px 25px;
    margin-bottom: 25px;
}

.stepper-header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1.5px dashed var(--card-border);
}

.stepper-title-text {
    font-size: 1rem;
    font-weight: 900;
    color: var(--gold);
}

.stepper-subtitle-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* Active Prayer Focus Banner */
.active-prayer-focus-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    margin-bottom: 25px;
    border-radius: 16px;
    background: rgba(236, 193, 50, 0.1);
    border: 1.5px solid var(--gold);
    box-shadow: 0 4px 20px var(--gold-glow);
    text-align: center;
}

.focus-banner-icon {
    font-size: 1.4rem;
}

.focus-banner-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
}

.active-prayer-highlight {
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 900;
    padding: 2px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
}

body.dark-theme .active-prayer-highlight, body.theme-fajr .active-prayer-highlight, body.theme-maghrib .active-prayer-highlight, body.theme-isha .active-prayer-highlight {
    background: rgba(255, 255, 255, 0.1);
    color: #ecc132;
}

.progress-line-bg {
    position: absolute;
    top: 42px;
    left: 45px;
    right: 45px;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    z-index: 1;
}

body.dark-theme .progress-line-bg, body.theme-fajr .progress-line-bg, body.theme-maghrib .progress-line-bg, body.theme-isha .progress-line-bg {
    background: rgba(255, 255, 255, 0.12);
}

.progress-line-fill {
    height: 100%;
    background: var(--gold);
    transition: width 0.4s ease;
}

.wizard-steps {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
}

.step-node {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-node.active .step-icon {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(236, 193, 50, 0.15);
    box-shadow: 0 0 15px var(--gold-glow);
    transform: scale(1.1);
}

.step-node.completed .step-icon {
    background: var(--gold);
    border-color: var(--gold);
    color: #ffffff !important;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
}

.step-node.active .step-label {
    color: var(--gold) !important;
    font-weight: 900;
}

/* Wizard Header & Questions */
.app-header {
    text-align: center;
    margin-bottom: 25px;
}

.wizard-header-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.hadith-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hadith-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 700;
}

.wizard-card {
    padding: 30px 25px;
    margin-bottom: 25px;
}

.q-num {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(236, 193, 50, 0.15);
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 900;
    text-align: center;
    line-height: 28px;
}

.q-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-dark);
}

.q-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.p-total-selector {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.p-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1.5px solid var(--card-border);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-theme .p-btn, body.theme-fajr .p-btn, body.theme-maghrib .p-btn, body.theme-isha .p-btn {
    background: rgba(255, 255, 255, 0.08);
}

.p-btn.active {
    background: var(--gold);
    color: #ffffff !important;
    border-color: var(--gold);
    box-shadow: 0 4px 14px var(--gold-glow);
}

/* Question Cards & Options */
.question-card {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border: 1.5px solid var(--card-border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.88;
}

.question-card:hover, .question-card.focus-active {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 8px 25px var(--gold-glow);
}

body.dark-theme .question-card, body.theme-fajr .question-card, body.theme-maghrib .question-card, body.theme-isha .question-card {
    background: rgba(255, 255, 255, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.allocation-badge {
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    font-size: 0.8rem;
    font-weight: 900;
}

.allocation-badge.valid {
    background: rgba(77, 205, 196, 0.15);
    color: var(--success);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    transition: all 0.3s ease;
}

body.dark-theme .option-item, body.theme-fajr .option-item, body.theme-maghrib .option-item, body.theme-isha .option-item {
    background: rgba(255, 255, 255, 0.06);
}

.option-item.has-value {
    border-color: var(--gold);
    background: rgba(236, 193, 50, 0.12);
}

.option-name { font-size: 0.95rem; font-weight: 800; color: var(--text-dark); }
.option-desc { font-size: 0.82rem; color: var(--text-muted); }

.counter-control-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.counter-label {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--gold);
    background: rgba(236, 193, 50, 0.14);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(236, 193, 50, 0.3);
    white-space: nowrap;
}

.counter-row-btns {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    direction: rtl !important;
}

.btn-counter {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid var(--gold);
    background: var(--card-bg);
    color: var(--gold);
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-counter:hover {
    background: var(--gold);
    color: #ffffff !important;
}

.btn-counter.disabled-btn {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

.counter-val {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--gold);
    min-width: 30px;
    text-align: center;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1.5px solid var(--card-border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 30px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    text-decoration: none;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border: 1.5px solid var(--card-border);
    color: var(--text-dark);
}

body.dark-theme .btn-secondary, body.theme-fajr .btn-secondary, body.theme-maghrib .btn-secondary, body.theme-isha .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(236, 193, 50, 0.25);
    color: #ffffff !important;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--gold);
    color: var(--gold) !important;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary, .btn-gold {
    background: var(--gold-grad);
    border: 1.5px solid var(--gold);
    color: #ffffff !important;
    box-shadow: 0 6px 20px var(--gold-glow);
}

.btn-primary:hover:not(:disabled), .btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--gold-glow);
}

/* RESULTS SECTION (PERFECT 170px GAUGE RING & ULTRA MODERN ACCORDIONS) */
.results-section {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.results-hero-card {
    text-align: center;
    padding: 35px 25px;
    margin-bottom: 25px;
    border-radius: 24px;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.04), 0 0 25px var(--gold-glow);
    position: relative;
    overflow: hidden;
}

.result-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-dark);
}

.score-circle-container {
    position: relative !important;
    width: 170px !important;
    height: 170px !important;
    min-width: 170px !important;
    min-height: 170px !important;
    max-width: 170px !important;
    max-height: 170px !important;
    margin: 20px auto !important;
    display: block !important;
    overflow: visible !important;
}

.score-ring-svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 170px !important;
    height: 170px !important;
    z-index: 1 !important;
    transform: rotate(-90deg);
    transform-origin: center center;
}

.ring-bg {
    fill: none !important;
    stroke: rgba(0, 0, 0, 0.08) !important;
    stroke-width: 12 !important;
}

body.dark-theme .ring-bg {
    stroke: rgba(255, 255, 255, 0.12) !important;
}

.ring-fill {
    fill: none !important;
    stroke: var(--gold) !important;
    stroke-width: 12 !important;
    stroke-linecap: round !important;
    stroke-dasharray: 502.65 !important;
    stroke-dashoffset: 502.65;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-inner-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

.score-number {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: var(--gold) !important;
    line-height: 1 !important;
    display: block !important;
}

body.dark-theme .score-number {
    color: #ecc132 !important;
    text-shadow: 0 0 12px rgba(236, 193, 50, 0.4) !important;
}

.score-max {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: var(--text-muted) !important;
    margin-top: 4px !important;
    display: block !important;
}

body.dark-theme .score-max {
    color: rgba(255, 255, 255, 0.85) !important;
}

.stars-rating-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 1.4rem;
    color: var(--gold);
    margin: 12px 0;
}

.score-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 900;
}
.badge-excellent { background: rgba(77, 205, 196, 0.15); color: #4dcdc4; border: 1px solid rgba(77, 205, 196, 0.3); }
.badge-verygood { background: rgba(236, 193, 50, 0.15); color: var(--gold); border: 1px solid rgba(236, 193, 50, 0.3); }
.badge-good { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-poor { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Accordion Cards */
.results-accordions-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    margin-top: 20px;
}

.accordion-card {
    width: 100% !important;
    padding: 0 !important;
    border-radius: 18px !important;
    background: var(--card-bg) !important;
    border: 1.5px solid var(--card-border) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.accordion-card.active {
    border-color: var(--gold) !important;
    box-shadow: 0 8px 25px var(--gold-glow) !important;
}

.accordion-trigger {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    text-align: right !important;
}

.accordion-trigger-title {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: var(--text-dark) !important;
}

.acc-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(236, 193, 50, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.accordion-trigger-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.acc-pill {
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    background: rgba(236, 193, 50, 0.12) !important;
    color: var(--gold) !important;
}

.acc-arrow-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--gold);
    transition: transform 0.3s ease;
}

body.dark-theme .acc-arrow-btn {
    background: rgba(255, 255, 255, 0.08);
}

.accordion-card.active .acc-arrow-btn {
    transform: rotate(180deg);
    background: var(--gold);
    color: #ffffff !important;
}

.accordion-body {
    width: 100% !important;
    padding: 0 20px 20px 20px !important;
}

.accordion-body.hidden {
    display: none !important;
}

.prayers-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 15px;
}

.prayer-score-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 15px;
}

body.dark-theme .prayer-score-card {
    background: rgba(255, 255, 255, 0.03);
}

.prayer-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.prayer-name { font-size: 0.9rem; font-weight: 800; color: var(--text-dark); }
.prayer-percentage { font-size: 1rem; font-weight: 900; color: var(--gold); }

.mini-bar-bg { height: 6px; background: rgba(0, 0, 0, 0.08); border-radius: 3px; overflow: hidden; }
.mini-bar-fill { height: 100%; background: var(--gold-grad); border-radius: 3px; }

/* Responsive */
@media (max-width: 800px) {
    .landing-hero { grid-template-columns: 1fr; text-align: center; }
    .gender-cards-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

/* ==========================================================================
   ADMIN DASHBOARD & TELEMETRY STYLES
   ========================================================================== */
.admin-section {
    padding: 35px 30px;
    margin-bottom: 40px;
}

.admin-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.admin-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.admin-tabs-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    border-bottom: 1.5px solid var(--card-border);
    padding-bottom: 12px;
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1.5px solid transparent;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-theme .admin-tab-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.admin-tab-btn.active {
    background: var(--gold);
    color: #ffffff !important;
    border-color: var(--gold);
    box-shadow: 0 4px 14px var(--gold-glow);
}

.analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0, 0, 0, 0.02);
    border: 1.5px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 25px;
}

body.dark-theme .analytics-toolbar {
    background: rgba(255, 255, 255, 0.04);
}

.toolbar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-gold-sm {
    padding: 8px 18px;
    border-radius: 10px;
    background: var(--gold-grad);
    color: #ffffff !important;
    border: none;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}

.btn-danger-sm {
    padding: 8px 18px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--error) !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}

.btn-danger-sm:hover {
    background: var(--error);
    color: #ffffff !important;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.kpi-card {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(236, 193, 50, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kpi-details {
    display: flex;
    flex-direction: column;
}

.kpi-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-muted);
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-dark);
}

.kpi-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.analytics-card {
    padding: 22px;
    border-radius: 18px;
}

.card-section-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-item-row {
    margin-bottom: 12px;
}

.item-row-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.item-bar-bg {
    height: 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

body.dark-theme .item-bar-bg {
    background: rgba(255, 255, 255, 0.1);
}

.item-bar-fill {
    height: 100%;
    background: var(--gold-grad);
    border-radius: 4px;
}

/* Analytics Table */
.style-table-card {
    margin-bottom: 25px;
}

.table-responsive {
    overflow-x: auto;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.analytics-table th, .analytics-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--card-border);
}

.analytics-table th {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-dark);
    font-weight: 900;
}

body.dark-theme .analytics-table th {
    background: rgba(255, 255, 255, 0.08);
}

.analytics-table tbody tr:hover {
    background: rgba(236, 193, 50, 0.05);
}

/* Admin Settings Form Inputs */
.admin-select, .admin-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 6px;
    outline: none;
}

body.dark-theme .admin-select, body.dark-theme .admin-input {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.form-label {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-dark);
}

.question-details-edit-card {
    padding: 24px;
    margin-top: 20px;
    border-radius: 18px;
}

.options-edit-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 20px 0 12px 0;
}

.admin-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-footer, .admin-global-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1.5px solid var(--card-border);
}

/* ===================================================
   Prayer Diagnostic Collapsible Accordions
=================================================== */
.diag-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

body.dark-theme .diag-controls-bar,
body.theme-fajr .diag-controls-bar,
body.theme-maghrib .diag-controls-bar,
body.theme-isha .diag-controls-bar {
    background: rgba(255, 255, 255, 0.04);
}

.diag-controls-hint {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 700;
}

.diag-toggle-btns {
    display: flex;
    gap: 8px;
}

.btn-diag-toggle {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--gold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-diag-toggle:hover {
    background: var(--gold);
    color: #ffffff !important;
}

.prayer-diag-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prayer-diag-card {
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.25s ease;
}

body.dark-theme .prayer-diag-card,
body.theme-fajr .prayer-diag-card,
body.theme-maghrib .prayer-diag-card,
body.theme-isha .prayer-diag-card {
    background: rgba(255, 255, 255, 0.03);
}

.prayer-diag-card.active {
    border-color: rgba(236, 193, 50, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.prayer-diag-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.prayer-diag-trigger:hover {
    background: rgba(236, 193, 50, 0.06);
}

.prayer-diag-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prayer-diag-icon {
    font-size: 1.4rem;
}

.prayer-diag-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-dark);
}

.prayer-diag-score-badge {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.prayer-diag-score-badge.excellent {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.prayer-diag-score-badge.good {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.prayer-diag-score-badge.needs-work {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.prayer-diag-score-badge.zero-badge {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.prayer-diag-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.diag-summary-pill {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.diag-summary-pill.strength {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

.diag-summary-pill.growth {
    background: rgba(243, 156, 18, 0.12);
    color: #f39c12;
}

.prayer-diag-arrow {
    font-size: 0.8rem;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.prayer-diag-card.active .prayer-diag-arrow {
    transform: rotate(180deg);
}

.prayer-diag-body {
    padding: 0 18px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(236, 193, 50, 0.1);
    margin-top: 4px;
    padding-top: 14px;
}

.prayer-diag-body.hidden {
    display: none !important;
}

.diag-subgroup {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--card-border);
}

.diag-subgroup.strengths {
    background: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.25);
}

.diag-subgroup.growth {
    background: rgba(243, 156, 18, 0.05);
    border-color: rgba(243, 156, 18, 0.25);
}

.diag-subgroup.perfect {
    background: rgba(236, 193, 50, 0.08);
    border-color: rgba(236, 193, 50, 0.3);
    text-align: center;
    font-weight: 800;
    color: var(--gold);
}

.diag-subgroup.zero {
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.25);
    text-align: center;
    font-weight: 800;
    color: #e74c3c;
}

.diag-subgroup-title {
    font-size: 0.92rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diag-subgroup.strengths .diag-subgroup-title {
    color: #27ae60;
}

body.dark-theme .diag-subgroup.strengths .diag-subgroup-title,
body.theme-fajr .diag-subgroup.strengths .diag-subgroup-title,
body.theme-maghrib .diag-subgroup.strengths .diag-subgroup-title,
body.theme-isha .diag-subgroup.strengths .diag-subgroup-title {
    color: #2ecc71;
}

.diag-subgroup.growth .diag-subgroup-title {
    color: #d35400;
}

body.dark-theme .diag-subgroup.growth .diag-subgroup-title,
body.theme-fajr .diag-subgroup.growth .diag-subgroup-title,
body.theme-maghrib .diag-subgroup.growth .diag-subgroup-title,
body.theme-isha .diag-subgroup.growth .diag-subgroup-title {
    color: #f39c12;
}

.diag-points-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diag-point-item {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.diag-point-item .point-bullet {
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===================================================
   Spiritual Guidance Message Card & Decorator
=================================================== */
.spiritual-message {
    position: relative;
    padding: 24px 28px;
    border-radius: 16px;
    border: 1px solid rgba(236, 193, 50, 0.3);
    background: rgba(236, 193, 50, 0.04);
    overflow: hidden;
}

body.dark-theme .spiritual-message,
body.theme-fajr .spiritual-message,
body.theme-maghrib .spiritual-message,
body.theme-isha .spiritual-message {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(236, 193, 50, 0.25);
}

.message-decorator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(236, 193, 50, 0.14);
    border: 1.5px solid rgba(236, 193, 50, 0.3);
    margin-bottom: 14px;
}

.stars-icon {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(236, 193, 50, 0.4));
}

.spiritual-text {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.85;
    color: var(--text-dark);
    margin: 0;
}

/* Print Styles for PDF Export */
@media print {
    .header-nav, .app-header, .form-actions, .results-footer, .app-footer, .theme-toggle, .lang-select-wrap, #adminView, .diag-controls-bar {
        display: none !important;
    }
    
    body {
        background: #ffffff !important;
        color: #111111 !important;
    }
    
    .results-hero-card, .accordion-card, .glass-card, .prayer-diag-card {
        background: #ffffff !important;
        border: 1px solid #dddddd !important;
        box-shadow: none !important;
        color: #111111 !important;
        page-break-inside: avoid;
    }
    
    .accordion-body.hidden, .prayer-diag-body.hidden {
        display: block !important;
    }
    
    .acc-arrow-btn, .prayer-diag-arrow {
        display: none !important;
    }

    #resultScoreNum {
        color: #b38600 !important;
    }
}

/* ===================================================
   Dual Sacred Text Card (Quran & Hadith Presentation)
=================================================== */
.sacred-text-box {
    margin: 14px 0;
    padding: 16px 20px;
    background: rgba(184, 134, 11, 0.06);
    border: 1.5px solid rgba(184, 134, 11, 0.28);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    text-align: right;
    direction: rtl;
    position: relative;
    transition: all 0.3s ease;
}

body.dark-theme .sacred-text-box,
body.theme-fajr .sacred-text-box,
body.theme-maghrib .sacred-text-box,
body.theme-isha .sacred-text-box {
    background: rgba(236, 193, 50, 0.08);
    border-color: rgba(236, 193, 50, 0.35);
}

.sacred-arabic {
    font-family: var(--font-serif);
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 2.1;
    color: #8d2325;
    margin-bottom: 8px;
}

body.dark-theme .sacred-arabic,
body.theme-fajr .sacred-arabic,
body.theme-maghrib .sacred-arabic,
body.theme-isha .sacred-arabic {
    color: #ecc132;
}

.sacred-meaning-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(184, 134, 11, 0.25);
    text-align: initial;
}

.sacred-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    border-radius: 6px;
    background: rgba(26, 41, 130, 0.08);
    color: var(--accent);
    margin-bottom: 6px;
}

body.dark-theme .sacred-badge,
body.theme-fajr .sacred-badge,
body.theme-maghrib .sacred-badge,
body.theme-isha .sacred-badge {
    background: rgba(236, 193, 50, 0.15);
    color: #ecc132;
}

.sacred-translation {
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.65;
    color: var(--text-dark);
}

.sacred-ref {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: 6px;
}

