/* Reading Page Specific Styles */
.floating-cards { display: none; }

/* ========== MAIN CONTAINER ========== */
.reading-container {
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 0 20px;
}

/* ========== LOADING ========== */
.loading-screen {
    text-align: center;
    padding: 100px 20px;
    color: var(--mystic-gold);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--mystic-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-interpretation {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.loading-interpretation .loading-spinner {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* ========== CARD SECTIONS ========== */
.card-section {
    margin: 0 auto 60px;
    padding: 0 20px;
    min-height: 600px;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--mystic-gold);
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-name {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #e4c4ff;
}

.card-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-image-container {
    position: relative;
    width: 100%;
    max-width: 280px;
    min-height: 527px;
    margin-bottom: 25px;
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* ========== CARD FLIPPER ========== */
.card-flipper {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.card-flipper.flipped {
    transform: rotateY(180deg);
    cursor: pointer; /* Keep pointer for re-clicking */
}

.card-flipper.locked {
    cursor: not-allowed;
    opacity: 0.7;
}

.card-back,
.card-face {
    width: 100%;
    backface-visibility: hidden;
}

.card-back {
    position: relative;
}

.card-face {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
}

.card-back img,
.card-face img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* ========== INTERPRETATION ========== */
.card-interpretation {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-top: 0;
    min-height: 150px;
}

.card-interpretation-text {
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(255,215,0,0.1);
}

.interpretation-locked {
    padding: 2rem;
    text-align: center;
    color: #9a8fb8;
    font-style: italic;
}

.interpretation-locked .lock-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.interpretation-locked .subtle {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========== GUIDANCE OVERLAYS ========== */
.oracle-guidance {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: rgba(26, 26, 46, 0.95);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--mystic-purple);
    text-align: center;
}

.guidance-message {
    color: var(--mystic-gold);
    font-size: 1.1rem;
    line-height: 1.6;
}

.guidance-message .subtle {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--mystic-purple);
}

.oracle-guidance-subtle {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(184, 167, 214, 0.1);
    color: #b8a7d6;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-style: italic;
    animation: fadeInOut 2s ease;
}

.awaiting-reveal {
    animation: pulse-glow 2s ease-in-out infinite;
}

.oracle-error {
    text-align: center;
    padding: 60px 20px;
    color: #b8a7d6;
}

.oracle-error h2 {
    color: var(--mystic-gold);
    margin-bottom: 1rem;
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

/* Email Modal */
.email-modal-content {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    margin: auto;
}

.email-modal-content h2 {
    color: var(--mystic-gold);
    text-align: center;
    margin-bottom: 10px;
}

.email-modal-content p {
    color: #b8a7d6;
    text-align: center;
    margin-bottom: 30px;
}

.email-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.email-input:focus {
    outline: none;
    border-color: var(--mystic-gold);
}

.submit-email-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8B7BA8 0%, #6B46C1 100%);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.submit-email-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.4);
}

.submit-email-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.email-privacy {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 20px;
}

.modal-dismiss {
    background: transparent;
    border: none;
    color: rgba(184, 167, 214, 0.6);
    font-size: 0.9rem;
    margin-top: 20px;
    cursor: pointer;
    transition: color 0.3s;
    font-style: italic;
}

.modal-dismiss:hover {
    color: rgba(184, 167, 214, 0.9);
}

/* Verification Modal */
.verification-gate {
    background: #1a1a2e;
    border: 2px solid #b8a7d6;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Bonus Login Modal (cross-browser/device claim) */
.bonus-login-gate {
    background: #1a1a2e;
    border: 2px solid #d4a574;
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.bonus-login-gate h2 {
    color: #d4a574;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.bonus-info {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.15) 0%, rgba(26, 26, 46, 0.8) 100%);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.bonus-info p {
    color: #b8a7d6;
    margin-bottom: 0.5rem;
}

.bonus-email-hint {
    color: #d4a574 !important;
    margin-top: 1rem !important;
}

.masked-email-display {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

.fortune-alert {
    background: linear-gradient(135deg, #2e1a47 0%, #1a1a2e 100%);
    border: 1px solid #b8a7d6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.fortune-warning {
    color: #b8a7d6;
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.critical-warning {
    color: #ffd700;
    background: rgba(0,0,0,0.3);
    padding: 0.8rem;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.email-section {
    margin: 2rem 0;
}

.email-section label {
    color: #b8a7d6;
    display: block;
    margin-bottom: 0.5rem;
}

.email-edit-group {
    display: flex;
    gap: 0.5rem;
}

.email-hint {
    font-size: 0.9rem;
    color: #9a8fb8;
    margin-top: 0.5rem;
    font-style: italic;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-action-btn {
    background: linear-gradient(135deg, #b8a7d6, #9a8fb8);
    color: #1a1a2e;
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 167, 214, 0.4);
}

.ghost-btn {
    background: transparent;
    color: #9a8fb8;
    padding: 0.8rem;
    border: 1px solid #4a4a5e;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.ghost-btn:hover {
    border-color: #9a8fb8;
    background: rgba(154, 143, 184, 0.1);
}

.risk-text {
    font-size: 0.8rem;
    color: #ff9999;
    display: block;
    margin-top: 0.3rem;
}

.code-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #4a4a5e;
}

.code-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 0.5rem;
    background: #0f0f1e;
    border: 2px solid #b8a7d6;
    border-radius: 6px;
    color: #ffd700;
    margin: 1rem 0;
}

.secondary-btn {
    background: #2e1a47;
    color: #b8a7d6;
    padding: 0.5rem 1rem;
    border: 1px solid #b8a7d6;
    border-radius: 4px;
    cursor: pointer;
}

/* Payment Modal */
.payment-modal-content {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(107, 70, 193, 0.4);
    border: 1px solid var(--glass-border);
}

.payment-modal-content h2 {
    color: #e4c4ff;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
}

.payment-modal-content p {
    color: #b8a7d6;
    text-align: center;
    margin-bottom: 30px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-button {
    background: linear-gradient(135deg, var(--mystic-gold) 0%, #b8936d 100%);
    border: none;
    padding: 18px 30px;
    border-radius: 30px;
    color: var(--cosmic-black);
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    min-height: 44px;
}

.payment-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.5);
}

.payment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.close-modal {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #b8a7d6;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    min-height: 44px;
}

.close-modal:hover {
    background: var(--glass-white);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(184, 167, 214, 0.3); }
    50% { box-shadow: 0 0 40px rgba(184, 167, 214, 0.6); }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ========== TABLET LAYOUT (768px - 1023px) ========== */
@media (min-width: 768px) and (max-width: 1023px) {
    .card-title {
        text-align: left;
        font-size: 1.3rem;
    }
    
    .card-name {
        text-align: left;
        font-size: 1.5rem;
    }
    
    .card-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }
    
    .card-image-container {
        flex: 0 0 300px;
        max-width: 300px;
        margin-bottom: 0;
    }
    
    .card-interpretation {
        flex: 1;
        min-width: 0;
    }
    
    .card-interpretation-text {
        background: transparent;
        border: none;
        padding: 0;
    }
}

/* ========== DESKTOP LAYOUT (1024px+) ========== */
@media (min-width: 1024px) {
    .card-title {
        text-align: left;
        font-size: 1.3rem;
    }
    
    .card-name {
        text-align: left;
        font-size: 1.5rem;
    }
    
    .card-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }
    
    .card-image-container {
        flex: 0 0 350px;
        max-width: 350px;
        margin-bottom: 0;
    }
    
    .card-interpretation {
        flex: 1;
        min-width: 0;
    }
    
    .card-interpretation-text {
        background: transparent;
        border: none;
        padding: 0;
    }
}

/* ========== MOBILE LAYOUT (<768px) ========== */
@media (max-width: 767px) {
/*     .reading-container {
        margin-top: 135px !important;
        padding-top: 20px !important;
    } */
    
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .payment-modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        width: 100%;
        max-width: none;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-contrast: high) {
    :root {
        --mystic-gold: #FFFF00;
        --glass-border: rgba(255, 255, 255, 0.3);
    }
    
    .fortune-widget.low {
        border-color: #FF0000;
        background: rgba(255, 0, 0, 0.2);
    }
}

/* ========== CARD VISIBILITY ========== */
/* Ensure card backs are always visible */
.card-back {
    opacity: 1 !important;
    transition: none !important;
}

.card-back img {
    opacity: 1 !important;
}

/* Remove any fade-in for card sections */
.card-section {
    opacity: 1 !important;
    animation: none !important;
}


/* Fix placeholder truncation for code input */
.code-input-field::placeholder {
    font-size: 0.85rem !important;
    letter-spacing: 0.05rem !important;
    opacity: 0.7;
}

/* Keep large font for actual input */
.code-input-field {
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem !important;
}

