/* ============================================
   MYSTIC FATE — iOS-Inspired Celestial Design
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0c0c1d;
    --bg-elevated: #141428;
    --bg-card: rgba(22, 22, 45, 0.72);
    --bg-card-hover: rgba(30, 30, 55, 0.8);
    --purple-deep: #1e1640;
    --purple-mid: #3b2d7b;
    --purple-light: #8b5cf6;
    --purple-glow: rgba(139, 92, 246, 0.15);
    --gold: #c9a84c;
    --gold-light: #e8d5a3;
    --gold-glow: rgba(201, 168, 76, 0.12);
    --accent: #a78bfa;
    --pink: #e879a8;
    --text-primary: #f0ecf7;
    --text-secondary: #a69bc0;
    --text-tertiary: #6b5e8a;
    --separator: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-card: rgba(255, 255, 255, 0.1);
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --shadow-card: 0 2px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.12);
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(59, 45, 123, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ STARS BACKGROUND ============ */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: var(--max-opacity); transform: scale(1); }
}

/* ============ HEADER ============ */
.header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 1.5rem 1rem;
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5.5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.12em;
    filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.15));
}

.tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-top: 0.4rem;
    letter-spacing: 0.04em;
}

/* ============ NAVIGATION — iOS Tab Bar Style ============ */
.nav {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 1rem 1.25rem;
    max-width: 480px;
    margin: 0.5rem auto 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        transform var(--transition-spring),
        box-shadow 0.4s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    overflow: hidden;
    font-family: var(--font-body);
}

.nav-icon {
    font-size: 1.65rem;
    line-height: 1;
    display: block;
    transition: transform var(--transition-spring), filter 0.3s ease;
    filter: grayscale(0.4) brightness(0.85);
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nav-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.25), transparent 70%);
}

.nav-btn:hover {
    color: var(--text-secondary);
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.15);
}

.nav-btn:hover .nav-icon {
    transform: scale(1.12) translateY(-1px);
    filter: grayscale(0) brightness(1.1);
}

.nav-btn:hover .nav-label {
    opacity: 1;
}

.nav-btn:hover .nav-glow {
    opacity: 0.5;
}

.nav-btn:active {
    transform: scale(0.92);
}

/* Active state with glow pulse */
.nav-btn.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--accent);
    box-shadow:
        0 0 20px rgba(139, 92, 246, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-btn.active .nav-icon {
    filter: grayscale(0) brightness(1.15);
    animation: nav-icon-float 3s ease-in-out infinite;
}

.nav-btn.active .nav-label {
    opacity: 1;
    color: var(--accent);
    font-weight: 600;
}

.nav-btn.active .nav-glow {
    opacity: 1;
    animation: nav-glow-pulse 2.5s ease-in-out infinite;
}

@keyframes nav-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes nav-glow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Staggered entrance */
.nav-btn {
    animation: nav-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.nav-btn:nth-child(1) { animation-delay: 0.05s; }
.nav-btn:nth-child(2) { animation-delay: 0.08s; }
.nav-btn:nth-child(3) { animation-delay: 0.11s; }
.nav-btn:nth-child(4) { animation-delay: 0.14s; }
.nav-btn:nth-child(5) { animation-delay: 0.17s; }
.nav-btn:nth-child(6) { animation-delay: 0.20s; }
.nav-btn:nth-child(7) { animation-delay: 0.23s; }
.nav-btn:nth-child(8) { animation-delay: 0.26s; }
.nav-btn:nth-child(9) { animation-delay: 0.29s; }

@keyframes nav-enter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============ MAIN CONTENT ============ */
.main {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2rem;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: sectionIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============ GLASS CARD — iOS Material ============ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-smooth);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
    color: var(--gold-light);
    margin-bottom: 0.4rem;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.section-desc {
    color: var(--text-tertiary);
    font-weight: 300;
    margin-bottom: 1.75rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ============ CTA BUTTON — iOS-Style ============ */
.cta-btn {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    overflow: hidden;
    transition:
        transform var(--transition-spring),
        box-shadow var(--transition-smooth),
        opacity var(--transition-fast);
    letter-spacing: 0.03em;
    margin-bottom: 1.75rem;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

.cta-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

.cta-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2);
}

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

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    animation: glow-rotate 4s linear infinite;
    pointer-events: none;
}

@keyframes glow-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============ TAROT ============ */
.tarot-spread {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tarot-card-wrapper {
    perspective: 800px;
    width: 170px;
    height: 265px;
}

.tarot-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.tarot-card.flipped {
    transform: rotateY(180deg);
}

.tarot-card.reversed.flipped {
    transform: rotateY(180deg);
}

.tarot-front, .tarot-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tarot-back {
    background: linear-gradient(160deg, var(--purple-deep) 0%, #120e28 100%);
    border: 1.5px solid rgba(201, 168, 76, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tarot-back-pattern {
    font-size: 2.5rem;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.tarot-back-text {
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.7;
}

.tarot-front {
    background: linear-gradient(180deg, #1a1535 0%, #0e0b20 100%);
    border: 1.5px solid rgba(201, 168, 76, 0.3);
    transform: rotateY(180deg);
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tarot-position {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.tarot-name {
    font-family: var(--font-display);
    font-size: 0.88rem;
    color: var(--gold-light);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.tarot-reversed-badge {
    font-size: 0.6rem;
    color: var(--pink);
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.tarot-keywords {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
    font-weight: 300;
}

/* ============ READING TEXT — Content Area ============ */
.reading-text {
    background: rgba(139, 92, 246, 0.04);
    border-left: 2px solid rgba(201, 168, 76, 0.4);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.75;
    text-align: left;
    margin-top: 1rem;
}

.reading-text:empty {
    display: none;
}

.reading-text.streaming {
    position: relative;
}

.reading-text.streaming > *:last-child::after,
.reading-text.streaming:not(:has(*))::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 1em;
    background: var(--gold);
    border-radius: 1px;
    animation: blink-cursor 0.8s step-end infinite;
    margin-left: 3px;
    vertical-align: text-bottom;
}

/* ---- Rendered Markdown ---- */
.reading-text h3,
.oracle-msg-bubble h3,
.oracle-interpret-text h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--gold-light);
    letter-spacing: 0.04em;
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--separator);
    font-weight: 600;
}

.reading-text h3:first-child,
.oracle-msg-bubble h3:first-child,
.oracle-interpret-text h3:first-child {
    margin-top: 0;
}

.reading-text h4,
.oracle-msg-bubble h4,
.oracle-interpret-text h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 0.05em;
    margin: 1rem 0 0.4rem 0;
}

.reading-text p,
.oracle-msg-bubble p,
.oracle-interpret-text p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.8;
    font-weight: 300;
}

.reading-text strong,
.oracle-msg-bubble strong,
.oracle-interpret-text strong {
    color: var(--gold-light);
    font-weight: 600;
}

.reading-text em,
.oracle-msg-bubble em,
.oracle-interpret-text em {
    color: var(--text-secondary);
    font-style: italic;
}

.reading-text ul,
.reading-text ol,
.oracle-msg-bubble ul,
.oracle-msg-bubble ol,
.oracle-interpret-text ul,
.oracle-interpret-text ol {
    margin: 0.5rem 0 0.5rem 1.2rem;
    padding: 0;
}

.reading-text li,
.oracle-msg-bubble li,
.oracle-interpret-text li {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

.reading-text li strong,
.oracle-interpret-text li strong {
    color: var(--gold-light);
}

.reading-text blockquote,
.oracle-msg-bubble blockquote,
.oracle-interpret-text blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1.1rem;
    background: var(--gold-glow);
    border-left: 2px solid rgba(201, 168, 76, 0.5);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--gold-light);
    line-height: 1.75;
    font-weight: 300;
}

.reading-text blockquote p,
.oracle-msg-bubble blockquote p,
.oracle-interpret-text blockquote p {
    margin: 0;
}

.reading-text hr,
.oracle-msg-bubble hr,
.oracle-interpret-text hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--separator), var(--separator), transparent);
    margin: 1.5rem 0;
}

.reading-text code,
.oracle-msg-bubble code {
    background: var(--purple-glow);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85em;
    color: var(--accent);
}

/* ============ HOROSCOPE ============ */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 1.75rem;
}

.zodiac-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        all var(--transition-fast),
        transform var(--transition-spring);
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

.zodiac-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.zodiac-btn:active {
    transform: scale(0.96);
}

.zodiac-btn.active,
.zodiac-btn.my-sign.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(201, 168, 76, 0.08));
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
    color: var(--gold-light);
}

.zodiac-btn.my-sign {
    border-color: rgba(201, 168, 76, 0.15);
}

.zodiac-symbol {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.zodiac-name {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.horoscope-result {
    text-align: left;
}

.horoscope-result:empty {
    display: none;
}

.horoscope-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.horoscope-sign-symbol {
    font-size: 2.5rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--purple-glow);
    border-radius: var(--radius-md);
}

.horoscope-sign-info h3 {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 1.15rem;
    border: none;
    padding: 0;
    margin: 0 0 2px 0;
}

.horoscope-sign-info p {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    font-weight: 400;
}

/* ============ COMPATIBILITY ============ */
.compat-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.compat-select-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compat-select-group label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.compat-heart {
    font-size: 1.3rem;
    animation: pulse-heart 2.5s ease-in-out infinite;
    margin-top: 0.75rem;
}

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

/* Date Picker Row — iOS Wheel Style */
.date-picker-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.date-select {
    flex: 1;
    min-width: 0 !important;
    width: 0;
    text-align: center;
    text-align-last: center;
    padding: 10px 24px 10px 10px !important;
    background-position: right 6px center !important;
    font-size: 0.85rem;
}

.date-select:first-child {
    flex: 1.2;
}

.mystical-select {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 400;
    padding: 10px 36px 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23a69bc0'%3E%3Cpath d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.mystical-select:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.compat-result:empty {
    display: none;
}

.compat-signs-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.compat-signs-display .sign-badge {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============ NUMEROLOGY ============ */
.date-input-group {
    margin-bottom: 1.5rem;
}

.date-input-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mystical-input {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.mystical-input:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.numerology-result:empty {
    display: none;
}

.num-big-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--gold-light);
    filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.2));
    margin: 1rem 0 0.25rem;
    line-height: 1;
}

.num-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 400;
}

/* ============ LOADING ============ */
.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ FOOTER ============ */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* ============ PROFILE MODAL — iOS Sheet Style ============ */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.profile-modal.hidden {
    display: none;
}

.profile-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.profile-modal-content {
    position: relative;
    max-width: 380px;
    width: 100%;
    animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 2rem 1.5rem;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.profile-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gold-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-field {
    text-align: left;
}

.profile-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.profile-field .mystical-input {
    width: 100%;
    text-align: left;
}

.profile-field .date-picker-row {
    width: 100%;
}

.profile-field .date-picker-row .date-select {
    font-size: 0.82rem;
}

.profile-skip {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.profile-skip:hover {
    color: var(--accent);
}

/* Profile Badge */
.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.75rem;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    transition: background var(--transition-fast);
}

.profile-badge:hover {
    background: rgba(139, 92, 246, 0.1);
}

.profile-badge-symbol {
    font-size: 1rem;
}

.profile-badge-name {
    font-weight: 600;
    color: var(--gold-light);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.profile-edit-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0 2px;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.profile-edit-btn:hover {
    color: var(--accent);
}

/* ============ MYSTIC VISION ============ */
.vision-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 1.5rem;
    background: rgba(139, 92, 246, 0.04);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-subtle);
}

.vision-tab {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.vision-tab:hover {
    color: var(--text-secondary);
}

.vision-tab.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.vision-instructions {
    margin-bottom: 1.5rem;
}

.vision-instructions p {
    color: var(--text-tertiary);
    font-size: 0.88rem;
    font-weight: 300;
}

.vision-upload-area {
    margin-bottom: 1.5rem;
}

.vision-file-input {
    display: none;
}

.vision-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 2.5rem 2rem;
    border: 1.5px dashed rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-smooth);
    background: rgba(139, 92, 246, 0.02);
    -webkit-tap-highlight-color: transparent;
}

.vision-upload-label:hover {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.05);
}

.vision-upload-icon {
    font-size: 2.2rem;
    opacity: 0.7;
}

.vision-upload-text {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

.vision-preview-container {
    margin-bottom: 1.5rem;
    text-align: center;
}

.vision-preview-img {
    max-width: 260px;
    max-height: 300px;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(201, 168, 76, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    margin-bottom: 0.75rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.vision-change-btn {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 16px;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.vision-change-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============ ORACLE CHAT — iOS Messages Style ============ */
.oracle-chat {
    display: flex;
    flex-direction: column;
    height: 480px;
    max-height: 65vh;
    text-align: left;
}

.oracle-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.15) transparent;
}

.oracle-messages::-webkit-scrollbar {
    width: 4px;
}

.oracle-messages::-webkit-scrollbar-track {
    background: transparent;
}

.oracle-messages::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2);
    border-radius: 4px;
}

.oracle-msg {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    animation: msgIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.oracle-msg-user {
    flex-direction: row-reverse;
}

.oracle-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.08);
}

.oracle-msg-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.55;
    font-size: 0.9rem;
    word-wrap: break-word;
    font-weight: 300;
}

.oracle-msg-oracle .oracle-msg-bubble {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 18px 18px 18px 4px;
    color: var(--text-primary);
}

.oracle-msg-user .oracle-msg-bubble {
    background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
    border: none;
    border-radius: 18px 18px 4px 18px;
    color: white;
}

.oracle-msg-bubble.streaming > *:last-child::after,
.oracle-msg-bubble.streaming:not(:has(*))::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 1em;
    background: var(--accent);
    border-radius: 1px;
    animation: blink-cursor 0.8s step-end infinite;
    margin-left: 3px;
    vertical-align: text-bottom;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.oracle-input-area {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.oracle-input {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    padding: 11px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.oracle-input:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.oracle-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 300;
}

.oracle-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform var(--transition-spring), box-shadow var(--transition-fast);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.25);
}

.oracle-send-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.oracle-send-btn:active {
    transform: scale(0.94);
}

.oracle-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============ ASK THE ORACLE BUTTON ============ */
.oracle-ask-btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 20px;
    margin-top: 1rem;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-xl);
    color: var(--accent);
    cursor: pointer;
    transition: all var(--transition-fast), transform var(--transition-spring);
    -webkit-tap-highlight-color: transparent;
}

.oracle-ask-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.1);
}

.oracle-ask-btn:active {
    transform: scale(0.96);
}

.oracle-ask-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.oracle-interpret-result {
    margin-top: 1rem;
    text-align: left;
}

.oracle-interpret-result:empty {
    display: none;
}

.oracle-interpret-text {
    background: rgba(139, 92, 246, 0.04);
    border-left: 2px solid var(--accent);
    padding: 1.1rem 1.3rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.75;
    font-weight: 300;
}

.oracle-interpret-text.streaming > *:last-child::after,
.oracle-interpret-text.streaming:not(:has(*))::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 1em;
    background: var(--accent);
    border-radius: 1px;
    animation: blink-cursor 0.8s step-end infinite;
    margin-left: 3px;
    vertical-align: text-bottom;
}

.oracle-interpret-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ============ DREAM INTERPRETATION ============ */
.dream-input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.dream-input-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-align: center;
}

.mystical-textarea {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 300;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    width: 100%;
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.mystical-textarea:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.mystical-textarea::placeholder {
    color: var(--text-tertiary);
    font-weight: 300;
}

/* ============ CRYSTAL BALL ============ */
.crystal-ball-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    position: relative;
}

.crystal-ball-aura {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 40%, transparent 70%);
    animation: aura-breathe 4s ease-in-out infinite;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
}

@keyframes aura-breathe {
    0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -55%) scale(1.15); opacity: 1; }
}

.crystal-ball-orb {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%,
        rgba(210, 190, 255, 0.22) 0%,
        rgba(120, 70, 200, 0.15) 30%,
        rgba(60, 30, 120, 0.25) 60%,
        rgba(15, 10, 35, 0.8) 100%);
    border: 1.5px solid rgba(167, 139, 250, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 50px rgba(139, 92, 246, 0.12),
        0 0 100px rgba(139, 92, 246, 0.05),
        inset 0 0 30px rgba(139, 92, 246, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: orb-idle-glow 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes orb-idle-glow {
    0%, 100% {
        box-shadow:
            0 0 50px rgba(139, 92, 246, 0.12),
            0 0 100px rgba(139, 92, 246, 0.05),
            inset 0 0 30px rgba(139, 92, 246, 0.08),
            0 8px 32px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 60px rgba(139, 92, 246, 0.2),
            0 0 120px rgba(139, 92, 246, 0.08),
            inset 0 0 40px rgba(167, 139, 250, 0.12),
            0 8px 32px rgba(0, 0, 0, 0.3);
    }
}

.crystal-ball-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 15px rgba(167, 139, 250, 0.4));
    animation: icon-float 3s ease-in-out infinite;
    z-index: 2;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.crystal-ball-mist {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    pointer-events: none;
    animation: mist-swirl-1 8s linear infinite;
}

.crystal-ball-mist.mist-2 {
    background: radial-gradient(circle at 30% 70%, rgba(167, 139, 250, 0.08) 0%, transparent 55%);
    animation: mist-swirl-2 12s linear infinite reverse;
}

.crystal-ball-mist.mist-3 {
    background: radial-gradient(circle at 70% 30%, rgba(200, 160, 255, 0.06) 0%, transparent 50%);
    animation: mist-swirl-3 10s linear infinite;
}

@keyframes mist-swirl-1 {
    0% { transform: rotate(0deg) scale(1); opacity: 0.6; }
    25% { transform: rotate(90deg) scale(1.1); opacity: 0.8; }
    50% { transform: rotate(180deg) scale(1); opacity: 0.5; }
    75% { transform: rotate(270deg) scale(1.1); opacity: 0.7; }
    100% { transform: rotate(360deg) scale(1); opacity: 0.6; }
}

@keyframes mist-swirl-2 {
    0% { transform: rotate(0deg) scale(0.9); opacity: 0.5; }
    50% { transform: rotate(180deg) scale(1.15); opacity: 0.8; }
    100% { transform: rotate(360deg) scale(0.9); opacity: 0.5; }
}

@keyframes mist-swirl-3 {
    0% { transform: rotate(0deg) translateX(0); opacity: 0.4; }
    33% { transform: rotate(120deg) translateX(5px); opacity: 0.7; }
    66% { transform: rotate(240deg) translateX(-5px); opacity: 0.5; }
    100% { transform: rotate(360deg) translateX(0); opacity: 0.4; }
}

.crystal-ball-glow {
    position: absolute;
    width: 130%;
    height: 130%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
    pointer-events: none;
    animation: glow-pulse 5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Sparkle particles */
.crystal-ball-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sparkle {
    position: absolute;
    color: rgba(210, 190, 255, 0.7);
    font-size: 0.5rem;
    animation: sparkle-float 4s ease-in-out infinite;
}

.sparkle.s1 { top: 20%; left: 25%; animation-delay: 0s; animation-duration: 3.5s; }
.sparkle.s2 { top: 35%; right: 20%; animation-delay: 0.8s; animation-duration: 4.2s; }
.sparkle.s3 { bottom: 30%; left: 18%; animation-delay: 1.5s; animation-duration: 3.8s; }
.sparkle.s4 { top: 15%; right: 30%; animation-delay: 2.2s; animation-duration: 4.5s; }
.sparkle.s5 { bottom: 25%; right: 25%; animation-delay: 0.4s; animation-duration: 3.2s; }
.sparkle.s6 { top: 50%; left: 30%; animation-delay: 1.8s; animation-duration: 4s; }

@keyframes sparkle-float {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    20% { opacity: 1; transform: translateY(-4px) scale(1); }
    50% { opacity: 0.6; transform: translateY(-8px) scale(0.8); }
    80% { opacity: 0.9; transform: translateY(-3px) scale(1.1); }
}

/* Crystal ball base */
.crystal-ball-base {
    width: 60px;
    height: 14px;
    background: linear-gradient(to bottom, rgba(167, 139, 250, 0.15), rgba(100, 60, 180, 0.08));
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    margin-top: -4px;
    z-index: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.crystal-ball-orb.gazing {
    animation: crystal-pulse 1.5s ease-in-out infinite;
    box-shadow:
        0 0 80px rgba(139, 92, 246, 0.3),
        0 0 150px rgba(139, 92, 246, 0.1),
        inset 0 0 50px rgba(139, 92, 246, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

.crystal-ball-orb.gazing .crystal-ball-mist {
    animation-duration: 3s !important;
}

.crystal-ball-orb.gazing .crystal-ball-mist.mist-2 {
    animation-duration: 4s !important;
}

.crystal-ball-orb.gazing .crystal-ball-mist.mist-3 {
    animation-duration: 3.5s !important;
}

.crystal-ball-orb.gazing .sparkle {
    animation-duration: 1.5s !important;
    color: rgba(230, 210, 255, 0.9);
}

.crystal-ball-orb.revealed {
    box-shadow:
        0 0 70px rgba(201, 168, 76, 0.2),
        0 0 140px rgba(201, 168, 76, 0.06),
        inset 0 0 30px rgba(201, 168, 76, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(201, 168, 76, 0.3);
}

.crystal-ball-orb.revealed .sparkle {
    color: rgba(230, 210, 120, 0.8);
}

@keyframes crystal-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.crystal-meta {
    text-align: center;
    margin-bottom: 1rem;
}

.crystal-clarity,
.crystal-mist {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 300;
}

.crystal-vision-cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.crystal-vision-card {
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    flex: 1;
    min-width: 130px;
    max-width: 190px;
    text-align: center;
    animation: sectionIn 0.4s ease;
    transition: border-color var(--transition-fast);
}

.crystal-vision-card:hover {
    border-color: rgba(139, 92, 246, 0.2);
}

.crystal-vision-symbol {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.crystal-vision-name {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.crystal-vision-meaning {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-weight: 300;
    line-height: 1.4;
}

/* ============ TEA LEAF READING ============ */
.tea-cup-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.tea-cup {
    width: 130px;
    height: 110px;
    background: linear-gradient(180deg,
        rgba(30, 22, 64, 0.8) 0%,
        rgba(20, 14, 40, 0.9) 100%);
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px 8px 40px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tea-cup-inside {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.2));
}

.tea-cup.turning {
    animation: cup-turn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tea-cup.revealed {
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 30px rgba(201, 168, 76, 0.08);
}

@keyframes cup-turn {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg) scale(0.95); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(0.95); }
    100% { transform: rotate(360deg); }
}

.tea-meta {
    text-align: center;
    margin-bottom: 1rem;
}

.tea-type,
.tea-direction {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 300;
}

.tea-symbol-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.tea-symbol-card {
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    animation: sectionIn 0.4s ease;
    transition: border-color var(--transition-fast);
}

.tea-symbol-card:hover {
    border-color: rgba(139, 92, 246, 0.2);
}

.tea-symbol-pos {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 3px;
}

.tea-symbol-name {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--gold-light);
    margin-bottom: 3px;
}

.tea-symbol-meaning {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-weight: 300;
    line-height: 1.4;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .header {
        padding: 2rem 1rem 0.75rem;
    }

    .nav {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 0.75rem;
        max-width: 100%;
    }

    .nav-icon {
        font-size: 1.4rem;
    }

    .nav-label {
        font-size: 0.58rem;
    }

    .nav-btn {
        padding: 10px 4px 8px;
    }

    .zodiac-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tarot-card-wrapper {
        width: 140px;
        height: 220px;
    }

    .glass-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-lg);
    }

    .compat-form {
        flex-direction: column;
    }

    .compat-heart {
        margin-top: 0;
    }

    .crystal-vision-cards {
        flex-direction: column;
        align-items: center;
    }

    .crystal-vision-card {
        max-width: 100%;
    }

    .tea-symbol-cards {
        grid-template-columns: 1fr;
    }

    .oracle-chat {
        height: 400px;
    }

    .main {
        padding: 0.5rem 0.75rem 2rem;
    }
}

@media (max-width: 400px) {
    .zodiac-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .tarot-card-wrapper {
        width: 110px;
        height: 180px;
    }

    .tarot-name {
        font-size: 0.78rem;
    }

    .tarot-keywords {
        font-size: 0.68rem;
    }

    .nav {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 0.5rem;
    }

    .nav-icon {
        font-size: 1.25rem;
    }

    .nav-label {
        font-size: 0.52rem;
    }

    .nav-btn {
        padding: 8px 2px 6px;
        gap: 4px;
    }
}

/* ============ SAFE AREA (iOS notch) ============ */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }
}

/* ============ 小程序 web-view 适配 ============ */
body.miniprogram .header {
    padding-top: 0.5rem;
}

body.miniprogram .footer {
    display: none;
}
