/* Page Container */
.page-container {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    overflow: visible;
}

/* ========== ORACLE HEADER ========== */
.oracle-header {
    text-align: center;
    margin-bottom: 3rem;
    /* animation: fadeInDown 1s ease-out; */
    position: relative;
    z-index: 5;
	overflow: visible;  /* Don't clip shadows */
}

.site-title {
    font-family: 'Cinzel', serif;
    font-size: 4.5rem;
    color: #FFD700;
    margin-bottom: 0.9rem;
    letter-spacing: 3px;
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(0, 0, 0, 0.8),
        2px 2px 6px rgba(0, 0, 0, 1),
        -2px -2px 6px rgba(0, 0, 0, 1);
}

.site-tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
	padding: 80px 20px;  /* Give blur room */
    margin: -70px 0;     /* Compensate visually */
    text-shadow: 
        0 0 40px rgba(0, 0, 0, 1),
        0 0 50px rgba(0, 0, 0, 1),
        0 0 60px rgba(0, 0, 0, 1),
        0 0 80px rgba(0, 0, 0, 0.95),
        2px 2px 4px rgba(0, 0, 0, 1),
        -2px -2px 4px rgba(0, 0, 0, 1);
}

/* ========== MAIN CONTAINER ========== */
.selection-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* ========== ORACLE MESSAGE ========== */
.oracle-message {
    position: relative;
    z-index: 1;
    background: transparent;
    backdrop-filter: none;
}

.oracle-message h2,
.oracle-message p,
.oracle-message a {
    position: relative;
    z-index: 5;
}

.oracle-message h2 {
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(0, 0, 0, 0.8),
        2px 2px 6px rgba(0, 0, 0, 1),
        -2px -2px 6px rgba(0, 0, 0, 1);
}

.oracle-message p,
.oracle-message a {
    text-shadow: 
        0 0 35px rgba(0, 0, 0, 1),
        0 0 50px rgba(0, 0, 0, 1),
        0 0 65px rgba(0, 0, 0, 0.95),
        0 0 80px rgba(0, 0, 0, 0.9),
        3px 3px 5px rgba(0, 0, 0, 1),
        -3px -3px 5px rgba(0, 0, 0, 1);
}

.whisper-text,
#returnWhisper,
#headerWhisper {
    text-shadow: 
        0 0 45px rgba(0, 0, 0, 1),
        0 0 55px rgba(0, 0, 0, 1),
        0 0 65px rgba(0, 0, 0, 1),
        0 0 85px rgba(0, 0, 0, 1),
        0 0 100px rgba(0, 0, 0, 0.95),
        3px 3px 5px rgba(0, 0, 0, 1),
        -3px -3px 5px rgba(0, 0, 0, 1);
}

/* ========== SELECTION PANEL ========== */
.selection-panel {
    background: transparent;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    padding: 3rem;
    border-radius: 20px;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 1;
}

.panel-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #FFD700;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(0, 0, 0, 0.8),
        2px 2px 6px rgba(0, 0, 0, 1),
        -2px -2px 6px rgba(0, 0, 0, 1);
}

.panel-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.15rem;
    text-shadow: 
        0 0 40px rgba(0, 0, 0, 1),
        0 0 55px rgba(0, 0, 0, 1),
        0 0 70px rgba(0, 0, 0, 1),
        0 0 85px rgba(0, 0, 0, 0.95),
        3px 3px 6px rgba(0, 0, 0, 1),
        -3px -3px 6px rgba(0, 0, 0, 1);
}

/* ========== SELECTION OPTIONS ========== */
.selection-options {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
}

.radio-option:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(138, 43, 226, 0.5);
    transform: translateX(5px);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 50%;
    margin-right: 1.5rem;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
    z-index: 5;
}

.radio-option input[type="radio"]:checked ~ .radio-custom {
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.radio-option input[type="radio"]:checked ~ .radio-custom::after {
    content: '';
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseIn 0.3s ease-out;
}

.option-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
}

.option-title {
    color: #F5F5F5;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 1),
        0 0 45px rgba(0, 0, 0, 1),
        0 0 60px rgba(0, 0, 0, 0.95),
        3px 3px 5px rgba(0, 0, 0, 1),
        -3px -3px 5px rgba(0, 0, 0, 1);
}

.option-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    text-shadow: 
        0 0 35px rgba(0, 0, 0, 1),
        0 0 50px rgba(0, 0, 0, 1),
        0 0 65px rgba(0, 0, 0, 1),
        0 0 80px rgba(0, 0, 0, 0.95),
        3px 3px 5px rgba(0, 0, 0, 1),
        -3px -3px 5px rgba(0, 0, 0, 1);
}

/* ========== CARD SELECTION GRID ========== */
.card-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    animation: slideDown 0.3s ease-out forwards;
    position: relative;
    z-index: 5;
}

.card-option {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(75, 0, 130, 0.1) 100%);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    position: relative;
    z-index: 5;
}

.card-option:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(75, 0, 130, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-3px);
    box-shadow: 
        0 5px 15px rgba(138, 43, 226, 0.3),
        0 0 35px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(0, 0, 0, 0.7);
}

.card-option.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-color: #FFD700;
    color: #FFD700;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.3),
        0 0 40px rgba(0, 0, 0, 1),
        0 0 60px rgba(0, 0, 0, 0.9),
        0 0 80px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 215, 0, 0.2);
}

/* ========== SELECTED CARD DISPLAY ========== */
.selected-card-display {
    text-align: center;
    color: #FFD700;
    font-size: 1.3rem;
    margin: 0;
    min-height: 0;
    font-family: 'Cinzel', serif;
    position: relative;
    z-index: 10;
    text-shadow: 
        0 0 40px rgba(0, 0, 0, 1),
        0 0 55px rgba(0, 0, 0, 1),
        0 0 70px rgba(0, 0, 0, 1),
        0 0 85px rgba(0, 0, 0, 0.95),
        3px 3px 6px rgba(0, 0, 0, 1),
        -3px -3px 6px rgba(0, 0, 0, 1);
}

/* ========== START READING BUTTON ========== */
.start-reading-btn {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #6B46C1 0%, #4B0082 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: #F5F5F5;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Cinzel', serif;
    position: relative;
    z-index: 5;
}

.start-reading-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7B56D1 0%, #5B1092 100%);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    transform: translateY(-2px);
}

.start-reading-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #3A3A4A 0%, #2A2A3A 100%);
}

/* ========== CHECKBOX OPTION ========== */
.checkbox-option {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 1.5rem auto 0;  /* Auto margins for centering */
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
    max-width: fit-content;  /* Shrink to content */
}

.checkbox-option:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(138, 43, 226, 0.5);
}

.checkbox-option input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #FFD700;
    position: relative;
    z-index: 5;
}

.checkbox-option > span:first-of-type {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    position: relative;
    z-index: 5;
    text-shadow: 
        0 0 40px rgba(0, 0, 0, 1),
        0 0 55px rgba(0, 0, 0, 1),
        0 0 70px rgba(0, 0, 0, 1),
        0 0 85px rgba(0, 0, 0, 0.95),
        3px 3px 6px rgba(0, 0, 0, 1),
        -3px -3px 6px rgba(0, 0, 0, 1);
}

.checkbox-option > span:last-of-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-left: 8px;
    position: relative;
    z-index: 5;
    text-shadow: 
        0 0 45px rgba(0, 0, 0, 1),
        0 0 60px rgba(0, 0, 0, 1),
        0 0 75px rgba(0, 0, 0, 1),
        0 0 90px rgba(0, 0, 0, 1),
        3px 3px 6px rgba(0, 0, 0, 1),
        -3px -3px 6px rgba(0, 0, 0, 1);
}

/* ========== INFO PANEL ========== */
.info-panel {
    margin-top: 3rem;
    padding: 2rem;
    background: transparent;
    border: none;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 1.5s ease-out;
    position: relative;
    z-index: 1;
}

.info-panel h3 {
    color: #FFD700;
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 5;
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 1),
        0 0 45px rgba(0, 0, 0, 0.95),
        0 0 60px rgba(0, 0, 0, 0.9),
        2px 2px 5px rgba(0, 0, 0, 1),
        -2px -2px 5px rgba(0, 0, 0, 1);
}

.info-panel p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 1.15rem;
    position: relative;
    z-index: 5;
    text-shadow: 
        0 0 40px rgba(0, 0, 0, 1),
        0 0 55px rgba(0, 0, 0, 1),
        0 0 70px rgba(0, 0, 0, 1),
        0 0 85px rgba(0, 0, 0, 0.95),
        3px 3px 6px rgba(0, 0, 0, 1),
        -3px -3px 6px rgba(0, 0, 0, 1);
}

/* ========== BACKGROUND LAYERS ========== */
.background-layers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    min-height: 100%;
    pointer-events: none;
    z-index: 1;
}

.selection-panel-bg {
    position: absolute;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.95) 0%, rgba(20, 20, 40, 0.95) 100%);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 50px rgba(138, 43, 226, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.info-panel-bg {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

/* ========== FLOATING CARDS ========== */
.floating-cards-container {
    position: fixed;
    top: 150px;
    left: 0;
    right: 0;
    height: 600px;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
}

.floating-card {
    background-image: url('/assets/cards/ryder-waite-300px/Waite–Smith_Tarot_Roses_and_Lilies_cropped.webp');
    position: absolute;
    width: 380px;
    height: 650px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: floatCard 15s infinite ease-in-out;
    animation-play-state: paused;
    transition: opacity 8s ease-in-out;
}

.floating-card:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-card:nth-child(2) { left: 45%; animation-delay: 2s; }
.floating-card:nth-child(3) { left: 75%; animation-delay: 4s; }

/* ========== CONTENT LAYER ========== */
.content-layer {
    position: relative;
    z-index: 3;
}

.content-layer * {
    position: relative;
    z-index: 3;
}

/* Force text content above cards */
#unauthContent,
#unauthContent *,
#welcomeContent,
#welcomeContent *,
.panel-title,
.panel-subtitle,
.selection-panel h2,
.selection-panel p,
.selection-panel span,
.selection-panel label,
.selection-panel button,
.selection-panel div,
.selection-options,
.selection-options * {
    position: relative !important;
    z-index: 10 !important;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(138, 43, 226, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    color: #FFD700;
    font-size: 1.3rem;
    font-family: 'Cinzel', serif;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

@keyframes pulseIn {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== SCROLLBAR ========== */
.card-selection-grid::-webkit-scrollbar {
    width: 8px;
}

.card-selection-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.card-selection-grid::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.5);
    border-radius: 4px;
}

.card-selection-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.7);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
    }
    
    .selection-panel {
        padding: 2rem;
		text-align:center;
    }
    
    .panel-title {
        font-size: 2rem;
    }
    
    .card-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        padding: 1rem;
    }
    
    .card-option {
        font-size: 0.85rem;
        padding: 0.8rem;
    }

    .floating-cards-container {
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        max-width: 400px;
    }
    
    .floating-card {
        width: 150px;
        height: 260px;
        border-radius: 8px;
    }
    
    .floating-card:nth-child(1) { 
        left: 10%;
    }
    
    .floating-card:nth-child(2) { 
        left: 50%;
        transform: translateX(-50%);
    }
    
    .floating-card:nth-child(3) {
        display: none;
    }
    
    .checkbox-option {
        padding: 0.6rem 0.8rem;
        margin-top: 1.2rem;
    }
    
    .checkbox-option > span:first-of-type {
        font-size: 0.95rem;
    }
    
    .checkbox-option > span:last-of-type {
        font-size: 0.85rem;
    }
}

/* ========== AUTHENTICATION STATE STYLES ========== */
/* Hide/show content based on authentication state */
.authenticated #unauthContent { 
    display: none !important; 
}

.authenticated #welcomeContent { 
    display: block !important; 
}

/* Default state (not authenticated) */
#unauthContent {
    display: block;
}

#welcomeContent {
    display: none;
}

/* Performance optimizations */
#headerWhisper {
    contain: layout style paint;
}

#returnWhisper {
    opacity: 0.99; /* Just below 1, won't trigger LCP */
}

/* ========== WELCOME MESSAGES ========== */
.welcome-messages {
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
    padding: 0;
    font-family: 'Cinzel', serif;
}

.welcome-msg { 
    display: none;
    color: rgba(255,255,255,1);
}

/* Default - show anonymous */
.welcome-anonymous { 
    display: block; 
}

/* Soft session state */
.soft-session .welcome-anonymous { display: none; }
.soft-session .welcome-soft { display: block; }

/* Authenticated state */
.authenticated .welcome-anonymous,
.authenticated .welcome-soft { display: none; }
.authenticated .welcome-auth { display: block; }

/* Enhanced shadows for the welcome messages */
.welcome-messages {
    line-height: 1.5;
    padding: 0;
}

.welcome-messages p,
.welcome-messages a {
    position: relative;
    z-index: 10;
    text-shadow: 
        0 0 50px rgba(0, 0, 0, 1),
        0 0 70px rgba(0, 0, 0, 1),
        0 0 90px rgba(0, 0, 0, 1),
        0 0 110px rgba(0, 0, 0, 0.95),
        4px 4px 8px rgba(0, 0, 0, 1),
        -4px -4px 8px rgba(0, 0, 0, 1);
}

/* Make the link stand out */
.welcome-messages a {
    color: #FFD700 !important;  /* Gold instead of #d4a574 */
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.welcome-messages a:hover {
    color: #FFF !important;
    text-shadow: 
        0 0 50px rgba(255, 215, 0, 0.4),  /* Gold glow on hover */
        0 0 70px rgba(0, 0, 0, 1),
        0 0 90px rgba(0, 0, 0, 1),
        4px 4px 8px rgba(0, 0, 0, 1);
}





.welcome-auth {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFD700;
}