/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --bg-deep: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #0f3460;
    --text-primary: #f0e6d3;
    --text-secondary: #b8a88a;
    --text-muted: #7a6f5f;
    --accent: #e94560;
    --user-bubble: #1f4068;
    --jesus-bubble: #2a1a3e;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --radius: 16px;
}

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow: hidden;
}

/* ===== App Layout ===== */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh; /* dynamic viewport height — accounts for mobile browser chrome */
    height: 100vh; /* fallback for older browsers */
    max-width: 800px;
    margin: 0 auto;
}

@supports (height: 100dvh) {
    .app-container { height: 100dvh; }
}

/* ===== Header ===== */
.app-header {
    text-align: center;
    padding: 24px 16px 16px;
    background: linear-gradient(180deg, rgba(201, 168, 76, 0.15) 0%, transparent 100%);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.header-icon {
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 4px;
}

.app-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 2rem;
    color: var(--gold);
    letter-spacing: 2px;
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ===== Chat Area ===== */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    scroll-behavior: smooth;
}

.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 3px;
}

/* Welcome screen */
.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 16px;
    animation: fadeIn 0.6s ease;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.welcome-message h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.welcome-message p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 440px;
    line-height: 1.6;
}

/* Suggestion buttons */
.suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
    max-width: 440px;
}

.suggestion-btn {
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.25);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.suggestion-btn:hover {
    background: rgba(201, 168, 76, 0.2);
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* Chat bubbles */
.message {
    display: flex;
    margin-bottom: 20px;
    animation: slideUp 0.3s ease;
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: var(--radius);
    line-height: 1.65;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message.user .message-content {
    background: var(--user-bubble);
    border-bottom-right-radius: 4px;
    color: var(--text-primary);
}

.message.assistant .message-content {
    background: var(--jesus-bubble);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(201, 168, 76, 0.15);
    color: var(--text-primary);
}

.message.assistant .message-content strong,
.message.assistant .message-content b {
    color: var(--gold-light);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    background: var(--jesus-bubble);
    border-radius: var(--radius);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(201, 168, 76, 0.15);
    max-width: 80px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ===== Input Area ===== */
.input-area {
    padding: 12px 16px 20px;
    background: linear-gradient(0deg, var(--bg-deep) 0%, rgba(26, 26, 46, 0.95) 100%);
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 24px;
    padding: 8px 8px 8px 18px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--gold);
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.5;
    padding: 6px 0;
}

textarea::placeholder {
    color: var(--text-muted);
}

#micBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.3);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

#micBtn:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
}

#micBtn.recording {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.15);
    animation: pulse-mic 1.5s ease-in-out infinite;
}

@keyframes pulse-mic {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(233, 69, 96, 0); }
}

#sendBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    color: var(--bg-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

#sendBtn:hover {
    background: var(--gold-light);
    transform: scale(1.05);
}

#sendBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.clear-btn {
    display: none;
    margin: 10px auto 0;
    background: transparent;
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.clear-btn.visible {
    display: block;
}

/* ===== Prayer Play Button ===== */
.prayer-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid rgba(201, 168, 76, 0.35);
    color: var(--gold-light);
    border-radius: 20px;
    font-size: 0.82rem;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prayer-play-btn:hover {
    background: rgba(201, 168, 76, 0.25);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.prayer-play-btn.playing {
    background: rgba(201, 168, 76, 0.3);
    border-color: var(--gold);
    color: var(--gold);
}

.prayer-play-btn svg {
    flex-shrink: 0;
}

/* Candle prompt after prayer */
.candle-prompt-btn {
    display: block;
    margin-top: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px dashed rgba(201, 168, 76, 0.3);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 0.82rem;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: fadeIn 0.6s ease 0.8s both;
}

.candle-prompt-btn:hover {
    background: rgba(201, 168, 76, 0.12);
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-1px);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1; }
}

/* ===== Responsive — Tablets ===== */
@media (max-width: 768px) {
    .app-header h1 { font-size: 1.7rem; }
    .message-content { max-width: 82%; }
    .welcome-message { padding: 36px 14px; }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 480px) {
    /* Safe area for notched phones */
    .app-container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* --- Ultra-compact header: single row on mobile --- */
    .app-header {
        padding: 10px 12px 8px;
    }

    .header-top {
        justify-content: flex-start;
    }

    .header-top > div {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .header-icon {
        font-size: 22px;
        margin-bottom: 0;
    }

    .app-header h1 {
        font-size: 1.25rem;
        letter-spacing: 1px;
    }

    /* Hide tagline on mobile — saves a full line */
    .tagline {
        display: none;
    }

    .user-btn {
        width: 34px;
        height: 34px;
    }

    /* Chat area */
    .chat-area {
        padding: 10px 10px;
    }

    .message {
        margin-bottom: 12px;
    }

    .message-content {
        max-width: 88%;
        padding: 10px 14px;
        font-size: 0.88rem;
        border-radius: 14px;
        line-height: 1.55;
    }

    /* Welcome — compact so input is visible above keyboard */
    .welcome-message {
        padding: 16px 10px 10px;
        justify-content: flex-start;
    }

    .welcome-icon {
        font-size: 32px;
        margin-bottom: 6px;
    }

    .welcome-message h2 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }

    .welcome-message p {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .suggestions {
        margin-top: 12px;
        gap: 5px;
    }

    .suggestion-btn {
        padding: 9px 12px;
        font-size: 0.8rem;
        border-radius: 10px;
        min-height: 42px;
        display: flex;
        align-items: center;
    }

    /* Input area — keep it tight */
    .input-area {
        padding: 6px 10px 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .input-wrapper {
        padding: 5px 5px 5px 14px;
        border-radius: 22px;
    }

    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 4px 0;
    }

    #sendBtn,
    #micBtn {
        width: 36px;
        height: 38px;
    }

    /* Prayer button */
    .prayer-play-btn {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* Clear button */
    .clear-btn {
        margin: 6px auto 0;
        min-height: 36px;
        padding: 6px 14px;
    }

    /* Typing indicator */
    .typing-indicator {
        padding: 10px 14px;
    }

    .typing-dot {
        width: 7px;
        height: 7px;
    }
}

/* ===== Very small screens (iPhone SE, etc.) ===== */
@media (max-width: 360px) {
    .app-header h1 {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 0.72rem;
    }

    .welcome-message h2 {
        font-size: 1.15rem;
    }

    .message-content {
        max-width: 92%;
        font-size: 0.84rem;
    }
}

/* ===== Landscape mobile ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .app-header {
        padding: 6px 12px;
    }

    .header-icon {
        display: none;
    }

    .tagline {
        display: none;
    }

    .app-header h1 {
        font-size: 1.2rem;
    }

    .chat-area {
        padding: 8px 10px;
    }

    .welcome-message {
        padding: 12px 10px;
    }

    .welcome-icon {
        font-size: 24px;
        margin-bottom: 6px;
    }
}

/* ===== Header Top Row ===== */
.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-top > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.user-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.2);
}

.user-btn.logged-in {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.2);
    width: auto;
    border-radius: 20px;
    padding: 0 14px;
}

.user-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== Tab Navigation ===== */
.tab-nav {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(201, 168, 76, 0.05);
}

.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

.section-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.section-scroll::-webkit-scrollbar {
    width: 6px;
}

.section-scroll::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 3px;
}

.section-header {
    text-align: center;
    margin-bottom: 28px;
}

.section-icon {
    font-size: 42px;
    margin-bottom: 8px;
}

.section-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    color: var(--gold-light);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ===== Shared Form Styles ===== */
.gold-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--gold) 0%, #b8952e 100%);
    border: none;
    border-radius: 12px;
    color: var(--bg-deep);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.gold-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.gold-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form inputs shared */
.testimonial-form-card input,
.testimonial-form-card textarea,
.candle-form-card input,
.candle-form-card textarea,
.modal-card input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.92rem;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.testimonial-form-card input:focus,
.testimonial-form-card textarea:focus,
.candle-form-card input:focus,
.candle-form-card textarea:focus,
.modal-card input:focus {
    border-color: var(--gold);
}

.testimonial-form-card input::placeholder,
.testimonial-form-card textarea::placeholder,
.candle-form-card input::placeholder,
.candle-form-card textarea::placeholder,
.modal-card input::placeholder {
    color: var(--text-muted);
}

.testimonial-form-card textarea,
.candle-form-card textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== Testimonials Section ===== */
.testimonials-list {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: var(--radius);
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.testimonial-card .testimonial-name {
    font-weight: 600;
    color: var(--gold-light);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.testimonial-card .testimonial-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.testimonial-card .testimonial-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
}

.testimonial-form-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 24px;
}

.testimonial-form-card h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--gold-light);
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.testimonial-form-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.loading-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 20px;
}

.no-items-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 24px;
    font-style: italic;
}

/* ===== Candle Section ===== */
.candle-form-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 28px;
}

.amount-selector {
    margin-bottom: 16px;
}

.amount-selector label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.amount-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.amount-btn {
    flex: 1;
    min-width: 70px;
    padding: 12px 8px 8px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.amount-price {
    font-size: 1rem;
    font-weight: 700;
}

.amount-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.75;
    white-space: nowrap;
}

.amount-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.amount-btn.active {
    background: rgba(201, 168, 76, 0.2);
    border-color: var(--gold);
    color: var(--gold);
}

/* Custom amount row */
.custom-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.custom-amount-dollar {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.custom-amount-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
    -moz-appearance: textfield;
}

.custom-amount-input::-webkit-outer-spin-button,
.custom-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-amount-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

.custom-amount-ok {
    padding: 10px 18px;
    background: var(--gold);
    color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    transition: opacity 0.2s;
}

.custom-amount-ok:hover {
    opacity: 0.85;
}

.amount-btn.premium {
    background: rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.35);
}

.amount-btn.premium.active {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.3), rgba(201, 168, 76, 0.15));
    border-color: var(--gold-light);
    color: var(--gold-light);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.2);
}

.candle-submit-btn {
    margin-top: 4px;
}

.candles-chapel {
    margin-top: 8px;
}

.candles-chapel h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--gold-light);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 18px;
}

.candles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.candle-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
}

.candle-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 200, 50, 0.25), transparent 70%);
    border-radius: 50%;
    animation: flicker 2s ease-in-out infinite alternate;
}

@keyframes flicker {
    0%   { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
    25%  { opacity: 0.8; transform: translateX(-50%) scale(1.05); }
    50%  { opacity: 0.6; transform: translateX(-50%) scale(0.95); }
    75%  { opacity: 0.9; transform: translateX(-50%) scale(1.1); }
    100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
}

.candle-card .candle-flame {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(-2deg); }
    50%      { transform: rotate(2deg); }
}

.candle-card .candle-name {
    font-size: 0.82rem;
    color: var(--gold-light);
    font-weight: 600;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.candle-card .candle-intention {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ===== Auth Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.visible {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-icon {
    text-align: center;
    font-size: 36px;
    color: var(--gold);
    margin-bottom: 12px;
}

.modal-card h2 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--gold-light);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 6px;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 18px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--gold);
}

.auth-toggle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
    margin-top: 16px;
}

.auth-toggle a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.auth-message {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 12px;
    min-height: 20px;
}

.auth-message.success {
    color: #4caf50;
}

.auth-message.error {
    color: var(--accent);
}

/* ===== Mobile adjustments for new sections ===== */
@media (max-width: 480px) {
    .tab-btn {
        font-size: 0.75rem;
        padding: 8px 4px;
    }

    .section-scroll {
        padding: 16px 12px;
    }

    .section-icon {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .testimonial-form-card,
    .candle-form-card {
        padding: 18px 14px;
    }

    .candles-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .modal-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .user-btn {
        width: 36px;
        height: 36px;
    }

    .stats-bar {
        padding: 8px 12px;
    }

    .stat-num {
        font-size: 1rem;
    }

    .amount-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .amount-btn {
        flex: none;
        min-width: 0;
        padding: 10px 4px 6px;
    }

    .amount-label {
        font-size: 0.6rem;
        letter-spacing: 0;
    }
}

/* Tab badge (count) */
.tab-badge {
    display: inline-block;
    background: rgba(201, 168, 76, 0.25);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 3px;
    vertical-align: middle;
}

.tab-badge:empty {
    display: none;
}

/* ===== Candle social proof ===== */
.candle-social-proof {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 10px 0 14px;
    font-style: italic;
}

.candle-social-proof:empty {
    display: none;
}

.candle-reassurance {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 10px;
    font-style: italic;
}

/* ===== Monthly Candle Prompt Modal ===== */
.monthly-modal {
    text-align: center;
    max-width: 380px;
}

.monthly-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: sway 2s ease-in-out infinite;
}

.monthly-modal h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.monthly-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.monthly-benefit {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.4;
}

.monthly-yes-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-bottom: 8px;
}

.monthly-no-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    transition: color 0.2s;
}

.monthly-no-btn:hover {
    color: var(--text-secondary);
}

/* ===== Share Button & Social Menu ===== */
.share-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    margin-left: 6px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(201, 168, 76, 0.2);
    color: var(--text-muted);
    border-radius: 16px;
    font-size: 0.78rem;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(201, 168, 76, 0.08);
}

.share-menu {
    display: none;
    gap: 4px;
    align-items: center;
}

.share-wrap.open .share-menu {
    display: inline-flex;
    animation: fadeIn 0.2s ease;
}

.share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.15);
    background: rgba(201, 168, 76, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.share-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 168, 76, 0.15);
    transform: scale(1.12);
}

.share-link[data-platform="whatsapp"]:hover { color: #25d366; border-color: #25d366; }
.share-link[data-platform="x"]:hover { color: #e7e9ea; border-color: #e7e9ea; }
.share-link[data-platform="facebook"]:hover { color: #1877f2; border-color: #1877f2; }
.share-link[data-platform="email"]:hover { color: var(--gold-light); }
.share-link[data-platform="copy"]:hover { color: var(--gold-light); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===== Register Prompt Banner (in chat) ===== */
.register-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.12), rgba(201, 168, 76, 0.04));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 16px;
    animation: slideUp 0.4s ease;
}

.register-prompt-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.register-prompt-text strong {
    color: var(--gold-light);
}

.register-prompt .gold-btn {
    width: auto;
    padding: 8px 18px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== Testimonial Prompt (in chat) ===== */
.testimonial-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(42, 26, 62, 0.6);
    border: 1px dashed rgba(201, 168, 76, 0.2);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 16px;
    animation: slideUp 0.4s ease 0.5s both;
    cursor: pointer;
    transition: all 0.2s;
}

.testimonial-prompt:hover {
    background: rgba(42, 26, 62, 0.8);
    border-color: var(--gold);
}

.testimonial-prompt-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.testimonial-prompt-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
