:root {
    --primary-dark: #0a192f;
    --primary-purple: #112240;
    --accent-purple: #233554;
    --mystic-gold: #ffffff;
    /* Updated to White */
    --text-glow: 0 0 0.625rem rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Fluid Typography: Scale everything based on screen width */
html {
    font-size: 16px;
    /* Base size for desktop */
    background: transparent;
}

@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
        /* Tablet / Large Phone */
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 13px;
        /* Standard Mobile */
    }
}

@media screen and (max-width: 380px) {
    html {
        font-size: 11px;
        /* Small Mobile (Galaxy S7, iPhone SE, etc.) - SIGNIFICANT REDUCTION */
    }
}

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

/* Remove 300ms tap delay on interactive elements */
a,
button,
input,
textarea,
select,
.card,
.earn-option-card,
.btn-mystic,
.plus-btn,
.glass-back-btn,
.auth-btn,
.save-btn {
    touch-action: manipulation;
}

::placeholder {
    color: #ddd;
}

body {
    /* Native Android Background Active - CSS Transparent */
    background: transparent;
    min-height: 100vh;
    font-family: 'Raleway', sans-serif;
    color: #fff;
    overflow-x: hidden;
    position: relative;
    padding-top: 0;

    /* Seamless Entry */
    animation: pageFadeIn 0.6s ease-out forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body.fade-out-active {
    opacity: 0 !important;
    transition: opacity 0.3s ease-in;
    pointer-events: none;
}

/* Magic Sphere Particles */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1005;
    /* Above sphere and header */
}

/* Particles */
.particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, #fff, var(--mystic-gold));
    box-shadow: 0 0 15px var(--mystic-gold), 0 0 30px rgba(255, 215, 0, 0.8);
    opacity: 1;
    animation: fadeOutParticle 1.2s ease-out forwards;
    width: 12px;
    height: 12px;
    /* Increased base size */
}

.trail-dot {
    position: fixed;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1004;
    transform: translate(-50%, -50%);
    /* Center on cursor */
    animation: trailFade 0.8s forwards;
}

@keyframes trailFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}





@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Coffee Cup Animation */
@keyframes cupFloat {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-30deg);
    }
}

@keyframes cupSteam {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px) scale(1.5);
    }
}

.cup-animation {
    animation: cupFloat 3s ease-in-out infinite;
    display: inline-block;
}

.cup-steam-effect::after {
    content: '♨';
    /* Simple steam representation or use icon */
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    animation: cupSteam 2s infinite;
}

/* CSS Generated Sparkles */
.status-bar-scrim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(1px);
    /* Reduced from 2px */
    will-change: transform;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: transparent;
}

.stars::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(0.125rem 0.125rem at 1.25rem 1.875rem, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(0.125rem 0.125rem at 2.5rem 4.375rem, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(0.125rem 0.125rem at 3.125rem 10rem, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(0.125rem 0.125rem at 5.625rem 2.5rem, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(0.125rem 0.125rem at 8.125rem 5rem, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(0.125rem 0.125rem at 10rem 7.5rem, #ddd, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 12.5rem 12.5rem;
    opacity: 0.5;
    animation: starsAnim 100s linear infinite;
    will-change: transform;
}

@keyframes starsAnim {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-200px, -200px, 0);
    }
}

.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .2) 0.125rem, transparent 0.25rem),
        radial-gradient(white, rgba(255, 255, 255, .15) 1px, transparent 0.1875rem),
        radial-gradient(white, rgba(255, 255, 255, .1) 0.125rem, transparent 0.25rem);
    background-size: 34.375rem 34.375rem, 21.875rem 21.875rem, 15.625rem 15.625rem;
    background-position: 0 0, 2.5rem 3.75rem, 8.125rem 16.875rem;
    background-position: 0 0, 2.5rem 3.75rem, 8.125rem 16.875rem;
    animation: sparkleAnim 60s linear infinite;
    will-change: transform;
}

@keyframes sparkleAnim {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-62.5rem);
    }
}

.container {
    max-width: 37.5rem;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    /* Removed top padding */
    text-align: center;
    position: relative;
    z-index: 1;
    background: transparent;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-top: 0;
    padding-top: calc(10px + env(safe-area-inset-top));
    margin-bottom: 2rem;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
    /* Add gap to prevent overlap */
}

/* Taller screens (Portrait: 18:9, 19:9, 20:9 etc.) excluding 16:9 */
@media screen and (max-aspect-ratio: 9/17) {
    .app-header {
        padding-top: calc(15px + env(safe-area-inset-top)) !important;
    }
}

/* Header Grid Child Alignment - REMOVED (Replaced by Flex/Absolute) */
/* .app-header> :first-child { justify-self: start; } */
/* .app-header> :nth-child(2) { justify-self: center; } */
/* .app-header> :last-child { justify-self: end; } */

.header-logo-container {
    text-align: center;
    /* Reverted Absolute Positioning to center relative to available space */
    flex: 1;
    /* Take up all available space */
    display: flex;
    justify-content: center;
    /* Center content within the container */
}

/* Home Mode Overrides */
.app-header.home-mode {
    display: flex;
    justify-content: space-between;
}

.app-header.home-mode .header-logo-container {
    /* Reset for Home Mode */
    text-align: left;
    padding-left: 0;
    width: auto;
    flex: 0 0 auto;
    /* Do not grow, just fit content */
    display: block;
    /* Default display */
}

/* Main Icon (Fal Bak) */
.main-icon {
    font-size: 4.5rem;
    /* Reduced size */
    margin-bottom: 1.5rem;
    color: #ffffff;
    /* White Color */
    filter: drop-shadow(0 0 0.9375rem rgba(255, 255, 255, 0.6));
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    will-change: transform;
}

@media (hover: hover) {
    .main-action-card:hover .main-icon {
        transform: scale(1.1) rotate(-5deg);
    }
}

h1,
h2 {
    font-family: 'Raleway', sans-serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--mystic-gold);
    text-shadow: var(--text-glow);
    letter-spacing: 0.125rem;
}

.page-title-standard {
    font-family: 'Raleway', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--mystic-gold) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
    margin: 0 0 2rem 0 !important;
    text-align: center !important;
    letter-spacing: 2px !important;
    line-height: 1.2 !important;
    display: block !important;
}

.page-desc-standard {
    font-family: 'Raleway', sans-serif !important;
    font-size: 1.1rem !important;
    /* Slightly smaller than 1.25rem for better aesthetics */
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 2rem !important;
    line-height: 1.5 !important;
    text-align: center !important;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: block !important;
}

p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #e0d0ff;
}

.main-text h2 {
    margin-bottom: 0.625rem;
    font-family: 'Raleway', sans-serif;
    font-size: 2rem;
    color: var(--mystic-gold);
}

/* Glassmorphism Card */
.card {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.37);
    margin-bottom: 2rem;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    /* Start at 0 width */
    height: 0.35rem;
    /* Slightly thicker */
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    /* Mystic Gold Gradient */
    background-size: 200% 100%;
    z-index: 10000;
    /* Higher z-index */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 165, 0, 0.5);
    /* Stronger Glow */
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    /* Faster initial burst */
    animation: loaderShimmer 1.5s linear infinite;
    /* Faster shimmer */
    display: none;
    opacity: 0;
    transition: width 3s ease-out, opacity 0.3s ease;
}

@keyframes loaderShimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Form Styles */
.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--mystic-gold);
    font-family: 'Raleway', sans-serif;
    font-size: 1.125rem;
    letter-spacing: 1px;
}

.mystic-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    /* Remove default arrow for selects */
    -webkit-appearance: none;
    outline: none;
}

.mystic-input:focus {
    border-color: var(--mystic-gold);
    box-shadow: 0 0 0.9375rem rgba(118, 0, 188, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

/* Custom Select Arrow */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078';
    /* FontAwesome chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mystic-gold);
    pointer-events: none;
}

/* Feature Markers */
.feature-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 10;
}

.marker-arrow {
    color: var(--mystic-gold);
    font-size: 2rem;
    filter: drop-shadow(0 0 0.3125rem rgba(0, 0, 0, 0.8));
    animation: bounceMarker 1.5s infinite;
    position: absolute;
    bottom: 100%;
    /* Position above the target point */
}

@keyframes bounceMarker {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-0.625rem);
    }
}

/* Glass Cards */
.main-action-card {
    background: rgba(0, 0, 0, 0.15);
    /* Dark Glass */
    backdrop-filter: blur(0.625rem);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: #fff;
    box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.2);
}

.main-action-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.3);
    border-color: var(--mystic-gold);
}

.marker-tooltip {
    position: absolute;
    top: -1.875rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--mystic-gold);
    padding: 0.125rem 0.5rem;
    border-radius: 0.3125rem;
    font-size: 1rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-marker:hover .marker-tooltip {
    opacity: 1;
}

.upload-area:hover {
    border-color: var(--mystic-gold);
    background: rgba(0, 123, 255, 0.1);
    box-shadow: 0 0 0.9375rem rgba(0, 123, 255, 0.3);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #e0d0ff;
}

#file-input {
    display: none;
}

.preview-image {
    max-width: 100%;
    max-height: 18.75rem;
    border-radius: 0.625rem;
    display: none;
    margin-top: 1rem;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.5);
}

/* Mystic Button (Glass Style) */
.btn-mystic {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 2rem;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.1);
    text-shadow: 0 0 0.625rem rgba(255, 255, 255, 0.3);
    text-decoration: none;
    display: inline-block;
    z-index: 1;
}

.btn-mystic::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    z-index: -1;
    transition: none;
}

.plus-btn {
    margin-left: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--mystic-gold);
    color: #2a0a3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.plus-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0.625rem rgba(255, 215, 0, 0.5);
}

.btn-mystic:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    box-shadow: 0 0 1.5625rem rgba(255, 255, 255, 0.4);
    transform: translateY(-0.125rem);
    color: #fff;
    letter-spacing: 1px;
}

.btn-mystic:hover::after {
    animation: whiteShine 0.8s ease-in-out;
}

/* Floating Animation - Small Stars/Particles */
.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    /* Behind content but possibly visible */
    pointer-events: none;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 0.1875rem;
    height: 0.1875rem;
    background: rgba(255, 255, 255, 0.8);
    animation: animate 40s linear infinite;
    bottom: -0.625rem;
    border-radius: 50%;
    box-shadow: 0 0 0.3125rem rgba(255, 255, 255, 0.8);
}

.circles li:nth-child(1) {
    left: 25%;
    width: 0.25rem;
    height: 0.25rem;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 0.125rem;
    height: 0.125rem;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 0.1875rem;
    height: 0.1875rem;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 0.3125rem;
    height: 0.3125rem;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 0.125rem;
    height: 0.125rem;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 0.25rem;
    height: 0.25rem;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 0.375rem;
    height: 0.375rem;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 0.1875rem;
    height: 0.1875rem;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 0.125rem;
    height: 0.125rem;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 0.3125rem;
    height: 0.3125rem;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(-50rem) rotate(360deg);
        opacity: 0;
    }
}

/* Home Header & Welcome */
.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 0.625rem;
}

.welcome-text {
    text-align: left;
    /* Removed individual box styling */
}

.welcome-text h1 {
    font-size: 1.8rem;
    margin: 0;
    /* Gradient text or white? Funky Flow uses gradients but text usually white.
       home2.php used linear-gradient(45deg, #fff, var(--mystic-gold)) which is white to white now.
       So just white is fine. */
    color: #fff;
}

.welcome-text p {
    margin: 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

.credit-pill {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--mystic-gold);
    padding: 0.5rem 0.9375rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mystic-gold);
    backdrop-filter: blur(0.3125rem);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    /* Space for the arrow */
}

/* Grid Menu & Mini Cards */
.grid-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9375rem;
    margin-bottom: 2rem;
}

.mini-card {
    background: rgba(0, 0, 0, 0.15);
    /* Dark Glass Mini Card */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.9375rem;
    padding: 1.5rem;
    box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.2);
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.mini-card:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--mystic-gold);
    transform: translateY(-0.1875rem);
}

.mini-card i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.menu-icon-3d {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    margin-bottom: 0.3125rem;
    filter: drop-shadow(0 0.25rem 0.5rem rgba(0, 0, 0, 0.3));
    transition: transform 0.3s;
}

.mini-card:hover .menu-icon-3d {
    transform: scale(1.1);
}

.main-icon-3d {
    width: 6.25rem;
    height: 6.25rem;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0.5rem 0.9375rem rgba(0, 0, 0, 0.4));
    transition: transform 0.3s;
}

.main-action-card:hover .main-icon-3d {
    transform: scale(1.1) rotate(-5deg);
}

.mini-card span {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.5);
    letter-spacing: 0.03125rem;
}

/* Daily Tip */
.daily-tip {
    background: rgba(0, 0, 0, 0.2);
    /* Dark Glass Tip */
    border-left: 0.25rem solid var(--mystic-gold);
    padding: 0.9375rem;
    border-radius: 0 0.625rem 0.625rem 0;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.9375rem;
    text-align: left;
}

.icon-3d-sm {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.2));
    vertical-align: middle;
}

.icon-3d-nav {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    margin-bottom: 0.125rem;
    filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.2));
    transition: transform 0.2s;
}

.bottom-nav-item.active .icon-3d-nav {
    filter: drop-shadow(0 0 0.3125rem var(--mystic-gold));
    /* transform: scale(1.1); Removed to keep alignment */
}

.icon-3d-result {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
    margin-right: 0.5rem;
    vertical-align: text-bottom;
}

.daily-tip i {
    font-size: 1.5rem;
    color: var(--mystic-gold);
}

.daily-tip p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.75rem;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--mystic-gold);
}

.nav-item:hover i,
.nav-item.active i {
    /* transform: translateY(-5px); REMOVED DUPLICATE */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Ensure body has space for footer */
body {
    padding-bottom: 90px !important;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.coffee-cup {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    color: var(--mystic-gold);
    animation: pulse 2s infinite;
}

@keyframes float {
    0% {
        transform: translateY(0rem) rotate(0deg);
    }

    50% {
        transform: translateY(-1.25rem) rotate(5deg);
    }

    100% {
        transform: translateY(0rem) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Result Page */
.fortune-text {
    text-align: left;
    font-size: 1.25rem;
    line-height: 2rem;
    color: #fff;
    white-space: pre-line;
}

.fortune-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fortune-section:last-child {
    border-bottom: none;
}

.section-title {
    color: var(--mystic-gold);
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Page-specific overrides for compact design */
.result-card {
    padding: 1.5rem !important;
}

.cup-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
    width: 100%;
}

.cup-image {
    width: 100%;
    border-radius: 0.9375rem;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.5);
    display: block;
}

.symbols-box,
.seer-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.9375rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.symbols-title {
    color: var(--mystic-gold);
    font-family: 'Raleway', sans-serif;
    font-size: 1.375rem;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.symbols-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    /* Removed margin/padding/border as they are handled by the box now */
    gap: 1rem;
}

.symbol-item {
    text-align: center;
    width: 7.5rem;
}

.symbol-thumb {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 0.125rem solid var(--mystic-gold);
    box-shadow: 0 0 0.625rem rgba(255, 215, 0, 0.3);
    margin: 0 auto 0.25rem auto;
    background-repeat: no-repeat;
    background-size: cover;
}

.symbol-name {
    color: var(--mystic-gold);
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.symbol-desc {
    color: #ddd;
    font-size: 0.875rem;
    line-height: 1.3;
}

.seer-container {
    text-align: center;
    margin-bottom: 1rem;
}

.seer-avatar {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    border: 0.1875rem solid var(--mystic-gold);
    box-shadow: 0 0 0.9375rem rgba(255, 215, 0, 0.3);
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.seer-title {
    color: var(--mystic-gold);
    font-size: 1.5rem;
    margin: 0;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
}

.fortune-container {
    text-align: left;
}

.fortune-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.9375rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fortune-title {
    color: var(--mystic-gold);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.font-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.3125rem);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0.3125rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.font-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    z-index: -1;
    transition: none;
}

@media (hover: hover) {
    .font-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: #ffffff;
        color: #ffffff;
        box-shadow: 0 0 0.625rem rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }

    .font-btn:hover::after {
        animation: whiteShine 0.6s ease-in-out;
    }
}

.fortune-content {
    font-size: 1.25rem;
    line-height: 2rem;
    color: #fff;
    white-space: pre-line;
    margin: 0;
}

.action-btn {
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
}

.home-link {
    color: #ccc;
    text-decoration: none;
    font-size: 1.125rem;
    margin-top: 1rem;
    display: inline-block;
}

/* Profile Page Styles */
.profile-container {
    padding-bottom: 5rem;
}

.profile-header {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar-container {
    position: relative;
    width: 7.5rem;
    height: 7.5rem;
    margin: 0 auto 1rem;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 0.1875rem solid var(--mystic-gold);
    background: #2a0a3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--mystic-gold);
    box-shadow: 0 0 1.25rem rgba(255, 215, 0, 0.2);
    object-fit: cover;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--mystic-gold);
    color: #2a0a3d;
    border: none;
    border-radius: 50%;
    width: 2.1875rem;
    height: 2.1875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

@media (hover: hover) {
    .avatar-edit-btn:hover {
        transform: scale(1.1);
    }
}

.credit-badge {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid var(--mystic-gold);
    color: var(--mystic-gold);
    padding: 0.5rem 1.25rem;
    border-radius: 1.25rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.form-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: left;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--mystic-gold);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #d8b4fe;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    color: white;
    border-radius: 0.625rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--mystic-gold);
    outline: none;
    box-shadow: 0 0 0.625rem rgba(255, 215, 0, 0.1);
}

/* White Shine Animation */
@keyframes whiteShine {
    0% {
        left: -100%;
        opacity: 0;
    }

    20% {
        opacity: 0.5;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.save-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    width: 100%;
    border-radius: 1.5625rem;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.save-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    z-index: -1;
    transition: none;
}

@media (hover: hover) {
    .save-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        /* Subtle White Tint */
        border-color: #ffffff;
        box-shadow: 0 0 1.25rem rgba(255, 255, 255, 0.4);
        /* White Glow */
        transform: translateY(-0.125rem);
        color: #ffffff;
        letter-spacing: 1px;
    }

    .save-btn:hover::after {
        animation: whiteShine 0.8s ease-in-out;
    }
}

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

.save-btn:active {
    transform: scale(0.98);
}

.alert-success {
    background: rgba(81, 207, 102, 0.2);
    border: 1px solid #51cf66;
    color: #b2f2bb;
    padding: 0.625rem;
    border-radius: 0.625rem;
    margin-bottom: 1rem;
    text-align: center;
}

.delete-btn {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: none;
    border-radius: 50%;
    width: 1.875rem;
    height: 1.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    /* Reset float/margin from previous style if any */
    float: none;
    margin: 0;
    z-index: 10;
}

.delete-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

/* Profile List Card Grid - New Design */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.9375rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.profile-card.active {
    border-color: var(--mystic-gold);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-0.3125rem);
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-0.125rem);
}

.profile-card-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 0.125rem solid var(--mystic-gold);
    margin-bottom: 1rem;
    overflow: hidden;
    background: #2a0a3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-avatar i {
    font-size: 2rem;
    color: var(--mystic-gold);
}

.profile-card-name {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.profile-card-info {
    font-size: 0.8rem;
    color: #ccc;
    line-height: 1.4;
}

.add-profile-btn {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 0.125rem dashed rgba(255, 255, 255, 0.3);
    border-radius: 0.9375rem;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.add-profile-btn:hover {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0.9375rem rgba(255, 255, 255, 0.3);
}

/* --- Custom Flatpickr Theme for Nasip --- */
.flatpickr-calendar {
    background: #1a0b2e !important;
    /* Deep mystic purple */
    border: 1px solid var(--mystic-gold) !important;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.5) !important;
    border-radius: 0.9375rem !important;
    color: #fff !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--mystic-gold) !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: var(--mystic-gold) !important;
}

.flatpickr-months {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.flatpickr-month {
    color: var(--mystic-gold) !important;
    fill: var(--mystic-gold) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #1a0b2e !important;
    color: #fff !important;
}

.flatpickr-current-month input.cur-year {
    color: #fff !important;
}

.flatpickr-weekdays {
    background: transparent !important;
}

span.flatpickr-weekday {
    color: rgba(255, 255, 255, 0.7) !important;
    background: transparent !important;
}

.flatpickr-day {
    color: #fff !important;
}

.flatpickr-day.today {
    border-color: var(--mystic-gold) !important;
    background: rgba(255, 215, 0, 0.1) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day:focus,
.flatpickr-day.prevMonthDay:focus,
.flatpickr-day.nextMonthDay:focus {
    background: var(--mystic-gold) !important;
    border-color: var(--mystic-gold) !important;
    color: #1a0b2e !important;
    /* Dark text on gold bg */
    font-weight: bold;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.1) !important;
}

/* Time Picker override if used */
.flatpickr-time {
    border-top: 1px solid rgba(255, 215, 0, 0.2) !important;
}

.flatpickr-time .flatpickr-am-pm,
.flatpickr-time input {
    color: #fff !important;
}

.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:hover {
    background: rgba(255, 215, 0, 0.1) !important;
}

/* --- Flatpickr Fix: Year Arrows Visibility --- */
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: var(--mystic-gold) !important;
}

/* --- Mobile Tap Effects (Active States) --- */
/* Scale down elements when tapped for tactile feedback on touch devices */
.main-action-card:active,
.mini-card:active,
.btn-mystic:active,
.save-btn:active,
.plus-btn:active,
.glass-back-btn:active,
.avatar-edit-btn:active,
.font-btn:active,
.store-package-card:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: var(--mystic-gold) !important;
}

.flatpickr-current-month .numInputWrapper:hover {
    background: rgba(255, 215, 0, 0.1) !important;
}

/* --- Auth Pages (Login / Register) --- */
.auth-container {
    max-width: 400px;
    margin: 10vh auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--mystic-gold);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.link-text {
    display: block;
    margin-top: 15px;
    color: #ddd;
    text-decoration: none;
}

.error-msg {
    color: #ff6b6b;
    margin-bottom: 10px;
}

.success-msg {
    color: #51cf66;
    margin-bottom: 10px;
}

/* --- Store Page --- */
.store-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem 100px 1rem;
    /* Removed top padding */
    text-align: center;
    position: relative;
    z-index: 1;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns on mobile */
    gap: 10px;
    padding-bottom: 20px;
    justify-content: center;
}

@media (min-width: 600px) {
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--mystic-gold);
}

.credits-val {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.credits-label {
    color: #ffd700;
    /* Gold color instead of gray for better readability */
    font-size: 1.1rem;
    /* Increased from 0.9rem */
    font-weight: 500;
    margin-top: -5px;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 1;
    /* Ensure full visibility */
}

.price-val {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    color: white;
    margin-bottom: 15px;
}

.old-price {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin-bottom: 2px;
    font-weight: 500;
}

.badge {
    position: absolute;
    top: 15px;
    right: -32px;
    background: var(--badge-color, #777);
    color: white;
    padding: 4px 30px;
    transform: rotate(45deg);
    font-size: 0.6rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.buy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--mystic-gold);
    color: var(--mystic-gold);
    padding: 10px 15px;
    width: 100%;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.buy-btn:hover {
    background: var(--mystic-gold);
    color: #2a0a3d;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Success/Payment Overlay (Store Page) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
}

/* --- Magic Sphere Page --- */
.instruction-box {
    padding: 15px;
    margin: 10px 20px;
    text-align: center;
    color: #fff;
    width: 90%;
    max-width: 400px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.instruction-box h2 {
    font-weight: 400;
    font-size: 2rem;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.instruction-box p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
    min-height: 3em;
}

#instructionIcons {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.instruction-icon {
    font-size: 2.5rem;
    margin: 0;
    color: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    animation: pulseIcon 2s infinite ease-in-out;
    display: inline-block;
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.sphere-inner-anim {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: overlay;
    filter: blur(8px);
}

.nebula-swirl {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 100, 255, 0.4) 0%, rgba(100, 50, 255, 0.2) 30%, rgba(0, 0, 0, 0) 70%);
    animation: swirl 10s linear infinite;
}

.nebula-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.3), transparent 70%);
    animation: pulseInner 3s ease-in-out infinite;
}

@keyframes swirl {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes pulseInner {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.sphere-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.magic-sphere {
    width: 250px;
    height: 250px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 2;
    /* transition: transform 0.2s; REMOVED to prevent conflict with JS requestAnimationFrame scale updates */
    animation: breathe 4s ease-in-out infinite;
    -webkit-mask-image: radial-gradient(circle, black 69%, transparent 71%);
    mask-image: radial-gradient(circle, black 69%, transparent 71%);
    border-radius: 50%;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-drag: none;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.sphere-rotator {
    width: 100%;
    height: 100%;
    background: url('../images/icon_sphere_3d.png') no-repeat center center;
    background-size: contain;
    border-radius: 50%;
    animation: slowRotate 20s linear infinite;
}

@keyframes slowRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.magic-sphere.active {
    animation: none;
}

.magic-sphere.shaking {
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    pointer-events: none;
    z-index: 5;
}

.progress-ring circle {
    fill: transparent;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    /* transition: stroke-dashoffset 0.1s linear; REMOVED for smooth JS animation */
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.hand-guide-container {
    position: relative;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    animation: guideFade 1s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 20;
}

.hand-icon {
    font-size: 2.5rem;
    color: white;
    animation: moveHand 2s infinite ease-in-out;
}

@keyframes moveHand {
    0% {
        transform: translateX(-20px);
    }

    50% {
        transform: translateX(20px);
    }

    100% {
        transform: translateX(-20px);
    }
}

.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ad-content {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(20, 10, 30, 0.95), rgba(0, 0, 0, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    backdrop-filter: blur(15px);
}

.result-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.result-content {
    background: rgba(30, 20, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 85%;
    width: 400px;
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Responsive Adjustments for Short Screens (e.g. S7, SE) --- */
@media (max-height: 750px) {
    .container {
        padding: 0 1rem 1rem !important;
    }

    .app-header {
        margin-top: 50px !important;
        margin-bottom: 1rem !important;
    }

    .magic-sphere {
        width: 180px !important;
        height: 180px !important;
    }

    .progress-ring {
        width: 230px !important;
        height: 230px !important;
    }

    .sphere-container .card {
        padding: 1rem 1.25rem !important;
        margin-top: 0 !important;
    }

    .instruction-box {
        margin-bottom: 1rem !important;
    }

    .page-title-standard {
        font-size: 1.5rem !important;
    }

    #instructionIcons {
        font-size: 2rem !important;
        margin-top: 4px !important;
        margin-bottom: 8px !important;
    }

    #instructionText {
        font-size: 1.1rem !important;
    }

    .sphere-wrapper {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hand-guide-container {
        margin-top: 0.5rem !important;
    }

    .hand-icon {
        font-size: 1.5rem !important;
    }
}

.result-modal.show .result-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.result-title {
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.result-text {
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, #ffd700);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 0.5s ease;
    margin-bottom: 30px;
}

#instructionText p {
    margin-bottom: 0;
}

/* --- Select Profile Page --- */
.active-profile {
    border-color: var(--mystic-gold);
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.05);
}

/* --- Tarot Page --- */
.tarot-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.deck-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
}

.deck-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 10px;
    perspective: 1000px;
    overflow-x: auto;
    width: 100%;
    padding: 20px 10px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.deck-grid::-webkit-scrollbar {
    display: none;
}

.scroll-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--mystic-gold);
    color: var(--mystic-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.scroll-btn.left {
    left: -20px;
}

.scroll-btn.right {
    right: -20px;
}

.scroll-btn:hover {
    background: var(--mystic-gold);
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
    .deck-wrapper {
        width: 95%;
    }

    .scroll-btn.left {
        left: -5px;
    }

    .scroll-btn.right {
        right: -5px;
    }
}

.tarot-card-back {
    flex: 0 0 auto;
    width: 130px;
    height: 175px;
    background-image: url('../images/tarot_back_minimalist.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    cursor: grab;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    z-index: 10;
    will-change: transform;
}

.tarot-card-back:active {
    cursor: grabbing;
}

.drop-zone {
    width: 90%;
    max-width: 250px;
    height: 200px;
    margin-top: 30px;
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.drop-zone.drag-over {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.drop-zone i {
    margin-right: 10px;
    font-size: 1.5rem;
}

/* Custom Header Override for Tarot (Removed - Standardized) */

@media (max-width: 600px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .deck-grid {
        padding: 20px 10px !important;
        justify-content: center;
    }

    .tarot-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .deck-wrapper {
        width: 100% !important;
    }
}


/* --- Earn Credits Page --- */
.tabs {
    display: none;
}

.earn-menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    padding: 0 10px;
}

.earn-option-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.earn-option-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--mystic-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.earn-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.earn-icon-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.earn-icon-row i {
    font-size: 1.5rem;
    color: #fff;
}

.earn-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.earn-badge {
    background: rgba(4, 120, 87, 0.2);
    color: #34d399;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    width: fit-content;
    font-weight: 500;
}

.earn-badge.yellow {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}

.earn-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.earn-option-card:hover .earn-action-btn {
    background: var(--mystic-gold);
    color: #2a0a3d;
    border-color: var(--mystic-gold);
}

.back-nav-btn {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--mystic-gold);
    font-size: 1.1rem;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.earn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 70vh;
    text-align: center;
    padding-top: 20px;
}

.tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 50px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--mystic-gold);
    color: #2a0a3d;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.content-section {
    display: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.earn-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.ad-icon {
    font-size: 3rem;
    color: var(--mystic-gold);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.earn-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    white-space: nowrap;
    font-weight: bold;
    cursor: pointer;
    margin: 20px auto;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    width: fit-content;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.earn-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
    border-color: var(--mystic-gold);
    color: var(--mystic-gold);
}

.wheel-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
    background: linear-gradient(145deg, #d00000, #990000);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 10px 10px rgba(255, 255, 255, 0.2), inset 0 -10px 10px rgba(0, 0, 0, 0.4);
    border: 4px solid #ff4d4d;
    box-sizing: border-box;
}

.wheel-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
    animation: rotateLights 5s linear infinite;
}

.dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, #fff, #fbbf24);
    border-radius: 50%;
    box-shadow: 0 0 10px #fbbf24, inset 0 0 2px rgba(0, 0, 0, 0.2);
    left: 50%;
    top: 5px;
    margin-left: -4px;
    transform-origin: 50% 132px;
}

.wheel-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    border: 3px solid #FACC15;
    box-sizing: border-box;
    background: #222;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 5s cubic-bezier(0.1, 0, 0.2, 1);
    background: conic-gradient(from 345deg, #ef4444 0deg 30deg, #3b82f6 30deg 60deg, #f97316 60deg 90deg, #a855f7 90deg 120deg, #f1f5f9 120deg 150deg, #ef4444 150deg 180deg, #3b82f6 180deg 210deg, #f97316 210deg 240deg, #a855f7 240deg 270deg, #f1f5f9 270deg 300deg, #ef4444 300deg 330deg, #3b82f6 330deg 360deg);
}

.wheel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(transparent 40%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
}

.wheel-dividers {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: rotate(-15deg);
}

.divider-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
    transform-origin: center;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    background: radial-gradient(circle at 30% 30%, #fde047, #b45309);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.4);
    border: 2px solid #fff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-center i {
    color: #713f12;
    font-size: 1rem;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.wheel-marker {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    z-index: 20;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
}

.marker-arrow {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 35px solid #fbbf24;
    margin: 0 auto;
    position: relative;
    transform-origin: 50% 0;
}

.marker-arrow::after {
    content: '';
    position: absolute;
    top: -35px;
    left: -12px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 35px solid linear-gradient(to right, rgba(255, 255, 255, 0.4), transparent);
}

.ticking {
    animation: tick 0.15s infinite linear;
}

@keyframes tick {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(20deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.segment-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    width: 120px;
    padding-left: 45px;
    text-align: left;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    display: flex;
    align-items: center;
    height: 0;
    z-index: 4;
}

.segment-label span {
    display: inline-block;
}

.segment-dark-text {
    color: #333 !important;
    text-shadow: none !important;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--mystic-gold);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.mini-wheel-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: conic-gradient(#ef4444 0deg 60deg, #3b82f6 60deg 120deg, #f97316 120deg 180deg, #a855f7 180deg 240deg, #f1f5f9 240deg 300deg, #ef4444 300deg 360deg);
    border: 2px solid #fbbf24;
    position: relative;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.mini-wheel-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    border: 1px solid #fff;
}

/* --- Tarot Result Page --- */
.result-container {
    margin-top: 0;
    /* Removed top margin */
    text-align: center;
}

.blurred-content {
    filter: blur(15px);
    pointer-events: none;
    user-select: none;
    transition: filter 1s ease;
}

.revealed {
    filter: blur(0);
    pointer-events: auto;
    user-select: auto;
}

.tarot-card-img {
    width: 200px;
    height: 350px;
    border-radius: 15px;
    box-shadow: 0 0 25px var(--mystic-gold);
    margin-bottom: 2rem;
    object-fit: cover;
    background: #2a0845;
}

.meaning-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    line-height: 1.6;
    margin-top: 20px;
}

.meaning-box p {
    margin-bottom: 0;
    margin-top: 0;
}

/* Reused Elements like .ad-overlay, .loader are already in style.css or consolidated */
.watch-ad-btn-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.watch-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.watch-btn:hover {
    transform: scale(1.05);
}

/* --- Upload Page --- */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.upload-box {
    border: 2px dashed var(--mystic-gold);
    border-radius: 10px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.upload-box:hover {
    background: rgba(255, 215, 0, 0.1);
}

.upload-placeholder {
    text-align: center;
    color: var(--mystic-gold);
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    display: none;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #2a1b3d 0%, #0a0510 100%);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.splash-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    animation: pulseLogo 2s infinite ease-in-out;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

.splash-text {
    color: var(--mystic-gold);
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.splash-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 10px;
    font-family: 'Raleway', sans-serif;
}

.splash-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--mystic-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 30px;
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Upload Page Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 85%;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--mystic-gold);
    text-decoration: none;
    cursor: pointer;
}

/* --- Select Interpreter Page --- */
.char-option input:checked+.char-img-container {
    border-color: var(--mystic-gold) !important;
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.char-option input[type="radio"] {
    display: none;
}

.char-option.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.character-selection-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.interpreter-card-select {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.interpreter-card-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

.interpreter-card-select:has(input:checked) {
    border-color: var(--mystic-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.1);
}

.intention-option input {
    display: none;
}

.intention-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.intention-option input:checked+.intention-card {
    border-color: var(--mystic-gold);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.intention-card i {
    font-size: 1.2rem;
}

.interpreter-card-select input {
    display: none;
}

.select-img-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--mystic-gold);
    padding: 2px;
}

.select-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.select-content {
    flex-grow: 1;
}

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

.select-header h3 {
    color: var(--mystic-gold);
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
}

.price-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.select-subtitle {
    display: block;
    color: #FFD700;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.select-content p {
    font-size: 0.85rem;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.intention-ui {
    margin-top: 15px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 2px solid var(--mystic-gold);
    animation: fadeIn 0.3s ease;
}

/* Glass Back Button Design */
.glass-back-btn {
    position: fixed;
    /* Pushing down below status bar (1.25rem base + 1.875rem extra) */
    top: calc(env(safe-area-inset-top, 1.25rem) + 1.875rem);
    left: 1.25rem;
    margin: 0;
    z-index: 1001;

    display: inline-flex;
    width: 2.8125rem;
    height: 2.8125rem;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.2rem;

    /* Glass Effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;

    /* Shadow */
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1), inset 0 0 0.9375rem rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.glass-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 0.5rem 0.75rem rgba(0, 0, 0, 0.2), inset 0 0 1.25rem rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.glass-back-btn:active {
    transform: scale(0.95);
}

/* Mobile Adjustments - slightly smaller/tighter if needed */
@media (max-width: 37.5rem) {
    .glass-back-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.1rem;
        /* Mobile adjustment - Hardcoded strict safe space */
        top: 3.125rem !important;
        left: 0.9375rem !important;
    }
}

/* Page Header Layout */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
}

.page-header h1 {
    margin-bottom: 0;
    line-height: 1;
}

/* Bottom Navigation - Appended Fix */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    z-index: 99999;
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.75rem;
    cursor: pointer;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    color: #ffffff !important;
    /* Force white or gold depending on user pref, trying white first to match icon? No, mystic gold is for active */
    color: var(--mystic-gold) !important;
}

.nav-item:hover i,
.nav-item.active i {
    /* transform: translateY(-5px); REMOVED */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    color: var(--mystic-gold) !important;
}

/* Ensure body has space for footer */
body {
    padding-bottom: 90px !important;
}

/* --- Touch Interaction Optimization (No Sticky Hovers) --- */

/* Disable hover effects on touch devices */
@media (hover: none) {

    .btn-mystic:hover,
    .glass-back-btn:hover,
    .main-action-card:hover,
    .mini-card:hover,
    .profile-card:hover,
    .nav-item:hover {
        /* Reset hover transforms */
        transform: none !important;
        box-shadow: none !important;
        background: inherit !important;
    }
}

/* Active States (Touch Feedback) */
.btn-mystic:active,
.glass-back-btn:active,
.plus-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

.main-action-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--mystic-gold);
}

.mini-card:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--mystic-gold);
}

.nav-item:active {
    transform: scale(0.9);
    color: var(--mystic-gold);
}

.nav-item:active i {
    text-shadow: 0 0 15px var(--mystic-gold);
}

/* Specific Reset for Gradient Buttons to avoid background override */
.btn-mystic:active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Page Loader / Transition Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient Background matching body */
    /* Transparent with Blur as requested */
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.page-loader.active {
    opacity: 1;
    pointer-events: all;
}

/* Fade out content during load */
body.loading-state .container,
body.loading-state .sphere-container,
body.loading-state .store-container,
body.loading-state .profile-container,
body.loading-state .upload-container,
body.loading-state .bottom-nav,
body.loading-state .app-header {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Spinner Animation */
.page-loader::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

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