* { box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body { 
    background-color: #030305; color: #fafafa; margin: 0; padding: 1rem;
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
    overflow-x: hidden;
}

/* --- BACKGROUNDS --- */
.nebula-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(0, 210, 255, 0.4) 0%, transparent 35%),
        radial-gradient(ellipse at 25% 35%, rgba(255, 0, 150, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 65%, rgba(255, 0, 150, 0.35) 0%, transparent 55%);
    filter: blur(45px); animation: nebulaBreath 12s infinite alternate;
}
@keyframes nebulaBreath { from { transform: scale(1); opacity: 0.6; } to { transform: scale(1.1); opacity: 0.9; } }

.mystic-rays {
    position: fixed; top: 50%; left: 50%; width: 250vw; height: 250vw;
    background: repeating-conic-gradient(from 0deg, rgba(139, 92, 246, 0.12) 0deg 0.5deg, transparent 0.5deg 10deg);
    transform: translate(-50%, -50%); z-index: -1; animation: spin 180s linear infinite;
    mask-image: radial-gradient(circle at center, transparent 10%, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, transparent 10%, black 40%, transparent 85%);
}
@keyframes spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* --- CARD --- */
.card {
    background: #18181b; border: 1px solid #27272a; border-radius: 1.5rem;
    padding: 2.5rem; width: 100%; max-width: 440px; text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8); z-index: 10;
}

h2, h3, #fortune-text, .loading-pulse { text-align: center; margin: 0 auto; }

/* THE GLOBE */
.globe-container { width: 80px; height: 80px; margin: 0 auto 1.5rem; }
.crystal-ball {
    width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, #fff 0%, rgba(139, 92, 246, 0.4) 25%, #09090b 100%);
    box-shadow: inset 0 -10px 20px rgba(139, 92, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.3);
    animation: float 4s ease-in-out infinite; transition: 0.5s;
}
.crystal-ball.consulting { box-shadow: 0 0 50px 15px rgba(167, 139, 250, 0.8); filter: brightness(1.5); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* INPUTS */
.input-group { margin-bottom: 1.2rem; text-align: left; }
label { display: block; font-size: 0.7rem; color: #d4d4d8; margin-bottom: 0.4rem; text-transform: uppercase; font-weight: 700; }
.text-input { width: 100%; padding: 0.8rem; background: #09090b; border: 1px solid #3f3f46; border-radius: 0.5rem; color: #fff; outline: none; text-align: center; }

/* MOBILE BLOCKS & CURSOR */
.blocks-wrapper { position: relative; height: 3.2rem; width: 100%; }
#mobile-input { position: absolute; width: 100%; height: 100%; opacity: 0; z-index: 5; cursor: text; }
.blocks-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0.3rem; height: 100%; width: 100%; }
.blocks-grid span { background: #09090b; border: 1px solid #3f3f46; border-radius: 0.4rem; display: flex; align-items: center; justify-content: center; font-weight: bold; position: relative; }
.blocks-grid span.active { border-color: #8b5cf6; color: #a78bfa; }
.blocks-grid span.cursor::after { content: ''; position: absolute; width: 2px; height: 60%; background: #8b5cf6; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* BUTTONS */
.button-group { display: flex; gap: 0.8rem; margin-top: 1.5rem; }
.btn-primary { 
    flex: 2; background: #3f3f46; color: #a1a1aa; padding: 0.9rem; border-radius: 0.6rem; font-weight: bold; border: none; cursor: pointer; transition: 0.3s; position: relative; overflow: hidden;
}
.btn-primary.btn-ready { background: #8b5cf6; color: #fff; box-shadow: 0 0 15px rgba(139, 92, 246, 0.5); }
.btn-primary.btn-ready::after { content: ''; position: absolute; top: -50%; left: -60%; width: 20%; height: 200%; background: rgba(255, 255, 255, 0.3); transform: rotate(30deg); animation: shimmer 3s infinite; }
@keyframes shimmer { 0% { left: -60%; } 20%, 100% { left: 120%; } }

.btn-secondary { flex: 1; background: transparent; color: #a1a1aa; border: 1px solid #3f3f46; border-radius: 0.6rem; cursor: pointer; font-weight: bold; }

.privacy-note { font-size: 0.6rem; color: #52525b; margin-top: 1.2rem; }

/* RESULTS */
#result { margin-top: 1.5rem; padding: 1.5rem; background: #09090b; border-radius: 1rem; border: 1px solid #27272a; }
.loading-pulse { color: #a78bfa; font-style: italic; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.result-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; justify-content: center; }
.btn-action { flex: 1; max-width: 120px; height: 3.5rem; background: rgba(139, 92, 246, 0.1); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.4); border-radius: 0.6rem; cursor: pointer; }

.shop-section { margin-top: 1.5rem; padding: 0.8rem; background: rgba(139, 92, 246, 0.05); border-radius: 0.8rem; border: 1px dashed rgba(167, 139, 250, 0.3); }
.btn-shop { display: inline-block; margin-top: 0.5rem; padding: 0.5rem 1rem; background: #8b5cf6; color: white; text-decoration: none; border-radius: 2rem; font-weight: bold; font-size: 0.75rem; }

.hidden { display: none !important; }