:root {
    /* Color Palette - Al Haramain Style */
    --primary-dark: #0a0e14;
    --secondary-dark: #151c28;
    --accent-gold: #b89968;
    --accent-gold-light: #d4bc91;
    --accent-gold-soft: rgba(184, 153, 104, 0.15);

    --text-white: #ffffff;
    --text-dim: #a0aec0;
    --text-muted: #718096;

    --success: #2d8a5e;
    --success-light: #4ade80;
    --danger: #ef4444;

    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    --font-main: 'Outfit', 'IBM Plex Sans Arabic', sans-serif;
    --font-arabic: 'Amiri', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

input,
select,
textarea {
    font-size: 16px !important;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-dark);
    background-image: linear-gradient(rgba(10, 14, 20, 0.85), rgba(10, 14, 20, 0.95)), url('assets/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#main-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kaabah-icon {
    font-size: 1.5rem;
}

.nav-pills {
    display: flex;
    background: var(--secondary-dark);
    padding: 4px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item.active {
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(184, 153, 104, 0.3);
}

/* Container */
.main-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem 1rem 5rem;
}

/* Stepper */
.stepper-wrapper {
    margin-bottom: 2.5rem;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 0.5rem;
}

.progress-line {
    position: absolute;
    top: 16px;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: var(--secondary-dark);
    z-index: 0;
}

.step-dot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.dot-inner {
    width: 32px;
    height: 32px;
    background: var(--secondary-dark);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-dot.active .dot-inner {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(184, 153, 104, 0.4);
}

.step-dot.completed .dot-inner {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
}

.step-dot.completed .dot-inner::after {
    content: '✓';
    position: absolute;
    font-size: 0.75rem;
}

.step-dot.completed .dot-inner span {
    display: none;
}

.step-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-dot.active .step-label {
    color: var(--accent-gold);
    font-weight: 700;
}

/* Ritual Cards */
.ritual-card {
    background: var(--secondary-dark);
    border-radius: 24px;
    padding: 1.75rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.card-title {
    font-size: 1.1rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-header-center {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* Video */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: #000;
    border: 1px solid var(--glass-border);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Doa Box */
.doa-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.doa-box.highlight {
    border-left: 4px solid var(--accent-gold);
}

.doa-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.75rem;
}

.doa-arabic {
    font-family: var(--font-arabic);
    font-size: 1.75rem;
    text-align: right;
    color: var(--accent-gold);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.doa-arabic.small {
    font-size: 1.4rem;
}

.doa-latin {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.doa-translation {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Counter System */
.counter-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.ring-system {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--primary-dark);
    stroke-width: 8;
}

.ring-progress {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 628;
    /* 2 * PI * 100 */
    stroke-dashoffset: 628;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.counter-trigger {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2a3649, #0a0e14);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 2px 10px rgba(255, 255, 255, 0.05);
    transition: transform 0.1s;
    z-index: 2;
}

.counter-trigger:active {
    transform: scale(0.95);
}

.count-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.count-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.info-badge {
    background: rgba(45, 138, 94, 0.15);
    color: var(--success-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(74, 222, 128, 0.1);
    margin-top: 1.5rem;
}

/* Accordion */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.accordion-item {
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    text-align: left;
    color: var(--text-white);
}

.acc-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gold-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px;
}

.acc-icon img,
.acc-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    fill: var(--accent-gold);
}

.acc-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
}

.acc-chevron::before {
    content: '▼';
    font-size: 0.6rem;
    color: var(--accent-gold);
    transition: transform 0.3s;
    display: block;
}

.accordion-item.active .acc-chevron::before {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content {
    max-height: 3500px;
}

.check-list {
    list-style: none;
    padding: 0 1rem 1rem 3.5rem;
}

.check-list li {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.check-list li::before {
    content: '✓';
    color: var(--success-light);
    font-weight: 700;
}

/* Actions */
.action-footer,
.action-footer-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

.action-footer-center {
    justify-content: center;
}

.btn-primary,
.btn-success,
.btn-secondary,
.btn-outline {
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(184, 153, 104, 0.2);
}

.btn-secondary {
    background: var(--secondary-dark);
    color: var(--text-dim);
    border: 1px solid var(--glass-border);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
}

.icon-btn-gold {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.audio-toggle {
    background: transparent;
    border: none;
    color: var(--accent-gold);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.audio-toggle.active {
    color: var(--primary-dark);
    background: var(--accent-gold);
    border-radius: 50%;
}

/* Toast */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .toast {
        top: 1rem;
        /* Higher up on mobile */
        width: 90%;
        /* Take up most width */
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Success Area */
.success-content {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.success-title {
    color: var(--success-light);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.success-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.success-sub {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.acc-body-text {
    padding: 0 1rem 1.5rem 3.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.rukun-accordion .accordion-item {
    margin-bottom: 0.5rem;
}

/* Utils */
.hidden {
    display: none !important;
}

.status-success {
    color: var(--success-light) !important;
    font-weight: 700;
}

@media (max-width: 400px) {
    .dot-inner {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.6rem;
    }

    .ritual-card {
        padding: 1.25rem;
    }

    .nav-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* Premium Visual Info Enhancements */
.visual-info.premium {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #1a2433 100%);
    border: 1px solid var(--accent-gold-soft);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-radius: 16px;
}

.visual-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-gold);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom-left-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

.visual-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.large-icon.pulse {
    animation: pulse-gold 2.5s infinite ease-in-out;
}

@keyframes pulse-gold {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(184, 153, 104, 0));
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 12px rgba(184, 153, 104, 0.4));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(184, 153, 104, 0));
    }
}

/* Accordion Specific Styling */
.accordion-content .doa-box.inner {
    margin: 0.5rem 1rem 1rem 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.15);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
}

.accordion-item.active {
    background: rgba(184, 153, 104, 0.08);
    border-color: var(--accent-gold-soft);
}

.accordion-item.active .accordion-header {
    border-bottom: 1px solid var(--glass-border);
}

.accordion-content .larangan-grid {
    padding: 0 1rem 1rem 1rem;
}

/* Fix for left alignment in premium visualization */
.visual-info.premium .check-list {
    padding-left: 0.5rem;
    margin: 0;
}

.visual-info.premium .check-list li {
    justify-content: flex-start;
    text-align: left;
}

/* === Tata Cara Video + Horizontal Transcript === */

.tatacara-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    margin: 1rem 0 0.75rem;
}

.tatacara-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.transcript-scroll-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0 1rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.transcript-scroll-container::-webkit-scrollbar {
    height: 3px;
}

.transcript-scroll-container::-webkit-scrollbar-track {
    background: var(--secondary-dark);
    border-radius: 2px;
}

.transcript-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 2px;
}

.tr-card {
    flex: 0 0 260px;
    scroll-snap-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tr-card:hover {
    border-color: rgba(184, 153, 104, 0.3);
}

.tr-card.active {
    background: rgba(184, 153, 104, 0.12);
    border-color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(184, 153, 104, 0.15);
}

.tr-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: monospace;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.tr-card.active .tr-time {
    color: var(--accent-gold);
}

.tr-arabic {
    font-family: var(--font-arabic);
    font-size: 1rem;
    color: var(--text-white);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    margin-bottom: 0.35rem;
}

.tr-card.active .tr-arabic {
    color: var(--accent-gold-light);
}

.tr-indo {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.tr-card.active .tr-indo {
    color: var(--text-white);
}

/* --- PREMIUM LOCK SCREEN --- */
#site-lock {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-lock.unlocked {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
}

.lock-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lock-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.lock-card p {
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.lock-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.lock-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.lock-input:focus {
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.25);
}

.lock-btn {
    background: #d4af37;
    color: #064e3b;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.lock-btn:hover {
    background: #f1c40f;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.lock-error {
    color: #ff9999;
    font-size: 0.9rem;
    margin-top: 1rem;
    height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lock-error.show {
    opacity: 1;
}