/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Lora', Georgia, serif;
    background: #0a0a1a;
    color: #e8e0d0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== STARS BACKGROUND ===== */
.stars {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(255,215,140,0.4), transparent),
        radial-gradient(1px 1px at 30% 60%, rgba(255,215,140,0.3), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,215,140,0.5), transparent),
        radial-gradient(1px 1px at 70% 40%, rgba(255,215,140,0.3), transparent),
        radial-gradient(1px 1px at 90% 80%, rgba(255,215,140,0.4), transparent),
        radial-gradient(1px 1px at 15% 90%, rgba(255,215,140,0.2), transparent),
        radial-gradient(1px 1px at 45% 75%, rgba(255,215,140,0.3), transparent),
        radial-gradient(1px 1px at 80% 15%, rgba(255,215,140,0.4), transparent),
        radial-gradient(1.5px 1.5px at 25% 45%, rgba(255,215,140,0.6), transparent),
        radial-gradient(1.5px 1.5px at 65% 70%, rgba(255,215,140,0.5), transparent),
        radial-gradient(1px 1px at 5% 50%, rgba(255,215,140,0.3), transparent),
        radial-gradient(1px 1px at 55% 35%, rgba(255,215,140,0.4), transparent),
        radial-gradient(1px 1px at 85% 55%, rgba(255,215,140,0.3), transparent),
        radial-gradient(1px 1px at 35% 85%, rgba(255,215,140,0.4), transparent),
        radial-gradient(1.5px 1.5px at 75% 25%, rgba(255,215,140,0.5), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ===== PARTICLE CANVAS ===== */
#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== LAYOUT ===== */
.container {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 60px 0 40px;
}

.screen.active {
    display: block;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3rem;
    font-weight: 600;
    color: #f0e0c0;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.tagline {
    font-size: 1.1rem;
    color: #b0a080;
    font-style: italic;
    margin-bottom: 40px;
}

.divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9952b, transparent);
    margin: 0 auto 32px;
}

/* ===== HOME SCREEN ===== */
.instruction {
    font-size: 1.1rem;
    color: #c8c0b0;
    margin-bottom: 48px;
    line-height: 1.6;
}

/* ===== ORB ===== */
.orb {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: transparent;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.orb-inner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffe08a, #c9952b 50%, #8a6914 100%);
    box-shadow:
        0 0 40px rgba(201,149,43,0.4),
        0 0 80px rgba(201,149,43,0.2),
        inset 0 -4px 12px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, box-shadow 0.3s ease;
}

.orb-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,149,43,0.15) 0%, transparent 70%);
    animation: orbPulse 4s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.orb:hover .orb-inner {
    box-shadow:
        0 0 60px rgba(201,149,43,0.6),
        0 0 120px rgba(201,149,43,0.3),
        inset 0 -4px 12px rgba(0,0,0,0.3);
}

.orb:active .orb-inner {
    transform: scale(0.95);
}

.orb.spinning .orb-inner {
    animation: orbSpin 1.2s ease-in-out;
}

@keyframes orbSpin {
    0% { transform: scale(1); box-shadow: 0 0 40px rgba(201,149,43,0.4), 0 0 80px rgba(201,149,43,0.2); }
    30% { transform: scale(0.85); }
    60% { transform: scale(1.1); box-shadow: 0 0 100px rgba(201,149,43,0.8), 0 0 200px rgba(201,149,43,0.4); }
    100% { transform: scale(1); box-shadow: 0 0 40px rgba(201,149,43,0.4), 0 0 80px rgba(201,149,43,0.2); }
}

.orb-hint {
    font-size: 0.85rem;
    color: #706858;
    margin-bottom: 56px;
}

/* ===== ABOUT BRIEF ===== */
.about-brief {
    max-width: 500px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
    color: #a09888;
}

.about-brief strong { color: #d4c0a0; }
.about-brief em { color: #c9952b; font-style: italic; }

/* ===== READING SCREEN ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid rgba(201,149,43,0.2);
    color: #b0a080;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 40px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.back-btn:hover {
    background: rgba(201,149,43,0.1);
    border-color: rgba(201,149,43,0.4);
    color: #e0d0b0;
}

/* ===== READING CARD ===== */
.reading-card {
    background: rgba(20, 18, 35, 0.6);
    border: 1px solid rgba(201,149,43,0.12);
    border-radius: 20px;
    padding: 40px 32px;
    backdrop-filter: blur(10px);
    animation: cardReveal 0.8s ease;
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.poem-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.9rem;
    color: #706858;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.reading-theme {
    font-size: 0.85rem;
    color: #c9952b;
    padding: 4px 14px;
    border: 1px solid rgba(201,149,43,0.25);
    border-radius: 20px;
    text-transform: capitalize;
    letter-spacing: 0.05em;
}

/* ===== PERSIAN TEXT ===== */
.persian-text {
    font-family: 'Scheherazade New', serif;
    font-size: 1.5rem;
    direction: rtl;
    text-align: center;
    color: #d4b870;
    line-height: 2.2;
    margin-bottom: 28px;
    padding: 8px 0;
}

/* ===== TRANSLATION ===== */
.translation {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-style: italic;
    color: #c8bca8;
    line-height: 1.9;
    margin-bottom: 28px;
}

/* ===== INTERPRETATION ===== */
.divider-ornament {
    color: #c9952b;
    font-size: 1rem;
    margin: 28px 0;
    opacity: 0.6;
}

.interpretation-section {
    text-align: left;
}

.interpretation-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.85rem;
    color: #907840;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.interpretation {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #c8c0b0;
}

/* ===== READING ACTIONS ===== */
.reading-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid rgba(201,149,43,0.25);
    color: #b0a080;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(201,149,43,0.1);
    border-color: rgba(201,149,43,0.4);
    color: #e0d0b0;
}

.action-btn.primary-action {
    background: linear-gradient(135deg, rgba(201,149,43,0.2), rgba(201,149,43,0.1));
    border-color: rgba(201,149,43,0.35);
    color: #d4c0a0;
}

.action-btn.primary-action:hover {
    background: linear-gradient(135deg, rgba(201,149,43,0.3), rgba(201,149,43,0.15));
    border-color: rgba(201,149,43,0.5);
    color: #ffe08a;
}

/* ===== SHARE TOAST ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 28, 45, 0.95);
    border: 1px solid rgba(201,149,43,0.3);
    color: #e0d0b0;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
    z-index: 100;
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    backdrop-filter: blur(10px);
}

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

/* ===== APP PROMO ===== */
.app-promo {
    margin-top: 48px;
    text-align: center;
}

.promo-divider {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,149,43,0.3), transparent);
    margin: 0 auto 24px;
}

.promo-text {
    font-size: 0.9rem;
    color: #706858;
    margin-bottom: 16px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #c9952b, #a07820);
    color: #1a1a2e;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(201,149,43,0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201,149,43,0.4);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== AD CONTAINER ===== */
.ad-container {
    margin-top: 32px;
    min-height: 100px;
    text-align: center;
}

/* ===== FOOTER ===== */
.site-footer {
    position: relative;
    z-index: 2;
    padding: 40px 0 32px;
    border-top: 1px solid rgba(201,149,43,0.1);
    font-size: 0.8rem;
    color: #504840;
    text-align: center;
}

.site-footer p { margin-bottom: 6px; }

.footer-links {
    margin-top: 12px;
}

.footer-links a {
    color: #806830;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #c9952b;
    text-decoration: underline;
}

.footer-links .sep {
    margin: 0 10px;
    color: #403830;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    h1 { font-size: 2.4rem; }

    .screen { padding: 40px 0 32px; }

    .orb {
        width: 130px;
        height: 130px;
    }

    .reading-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .persian-text {
        font-size: 1.3rem;
    }

    .translation {
        font-size: 1.1rem;
    }

    .reading-actions {
        flex-direction: column;
    }

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