﻿/* Fayte - Fortune Card Game Styles
   v2.2 Visual Fixes - Inputs, Layout & Opacity */


/* Import Mystical Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Quicksand:wght@300;400;500;600&display=swap');


/* Container */
.fayte-container {
    background: radial-gradient(circle at center, #2e1065, #0f172a, #000000);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-family: 'Quicksand', sans-serif;
    box-sizing: border-box;
    min-height: 100vh;
}


.fayte-container * {
    box-sizing: border-box;
}


/* Typography */
.fayte-title {
    font-family: 'Cinzel', serif !important;
    font-size: 5rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em !important;
    margin-bottom: 0.5rem !important;
    
    /* Solid bright gold */
    color: #fcd34d !important;
    
    /* Glow */
    text-shadow: 0 0 20px rgba(252, 211, 77, 0.5), 0 0 40px rgba(252, 211, 77, 0.3) !important;
}


.fayte-subtitle {
    font-family: 'Cinzel', serif !important;
    color: #e9d5ff !important;
    font-size: 1.25rem !important;
    margin-bottom: 3rem !important;
    letter-spacing: 0.3em !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    opacity: 0.8;
}


.fayte-instruction {
    font-family: 'Quicksand', sans-serif !important;
    color: #f3e8ff !important;
    text-align: center !important;
    margin-bottom: 2.5rem !important;
    font-size: 1.4rem !important;
    font-weight: 300 !important;
    letter-spacing: 0.05em;
}


.fayte-bold {
    font-weight: 600 !important;
    color: #fcd34d !important;
}


.fayte-intro-text {
    font-family: 'Quicksand', sans-serif !important;
    color: #e2e8f0 !important;
    text-align: center !important;
    max-width: 38rem !important;
    margin-bottom: 2.5rem !important;
    line-height: 1.8 !important;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
}


/* Name Input - Floating Line Style */
.fayte-name-input-group {
    margin-bottom: 2rem !important;
    width: 100%;
    display: flex;
    justify-content: center;
}


.fayte-name-input {
    font-family: 'Cinzel', serif !important;
    padding: 0.8rem 1rem !important;
    font-size: 1.5rem !important;
    /* Force a dark background to prevent white box on entry */
    background: rgba(0, 0, 0, 0.3) !important; 
    border: none !important;
    border-bottom: 2px solid rgba(168, 85, 247, 0.5) !important;
    border-radius: 4px 4px 0 0 !important;
    color: #fcd34d !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 320px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}


/* Brighter Placeholder Text */
.fayte-name-input::placeholder {
    /* Increased opacity and lightness for better readability */
    color: rgba(255, 255, 255, 0.7) !important; 
    font-family: 'Quicksand', sans-serif !important;
    font-size: 1.2rem !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500 !important;
}


.fayte-name-input:focus {
    background: rgba(0, 0, 0, 0.5) !important; /* Slightly darker on focus */
    border-bottom-color: #fcd34d !important;
    box-shadow: 0 10px 20px -10px rgba(252, 211, 77, 0.1) !important;
}


/* Fix for browser Auto-fill turning the background white */
.fayte-name-input:-webkit-autofill,
.fayte-name-input:-webkit-autofill:hover, 
.fayte-name-input:-webkit-autofill:focus, 
.fayte-name-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e1b4b inset !important; /* Matches dark theme */
    -webkit-text-fill-color: #fcd34d !important;
    transition: background-color 5000s ease-in-out 0s;
}


/* Stages */
.fayte-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}


.fayte-hidden {
    display: none !important;
}


/* Crystal Ball / Star */
.fayte-crystal-ball {
    font-size: 5rem !important;
    margin-bottom: 1rem;
    color: #fcd34d !important;
    text-shadow: 0 0 20px rgba(252, 211, 77, 0.6), 0 0 40px rgba(252, 211, 77, 0.4);
    animation: fayte-float 4s ease-in-out infinite !important;
}

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


/* Buttons */
.fayte-btn {
    font-family: 'Cinzel', serif !important;
    padding: 1rem 3rem !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    border: 1px solid rgba(252, 211, 77, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}


.fayte-btn-primary {
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.8), rgba(15, 23, 42, 0.9));
    color: #fcd34d !important; /* Gold text */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}


.fayte-btn-primary:hover {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.9), rgba(30, 41, 59, 0.9));
    border-color: #fcd34d;
    box-shadow: 0 0 15px rgba(252, 211, 77, 0.2);
    transform: translateY(-2px);
}


.fayte-btn-challenge {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.8), rgba(120, 53, 15, 0.9));
    color: #fcd34d !important; /* Force Gold/Light Text */
    border-color: rgba(252, 211, 77, 0.5) !important;
}


.fayte-btn-challenge:hover {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.9), rgba(146, 64, 14, 0.9));
    color: white !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}


.fayte-btn-share {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-color: rgba(255, 255, 255, 0.2) !important;
}


.fayte-btn-share:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white !important;
}


/* Cards */
.fayte-cards-container {
    display: flex !important;
    gap: 2rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    perspective: 1000px;
}


.fayte-card {
    width: 12rem !important;
    height: 18rem !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1.5rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    cursor: pointer !important;
    position: relative;
    background: rgba(20, 20, 30, 0.4) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(252, 211, 77, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}


.fayte-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
    mix-blend-mode: overlay;
}


.fayte-card:hover:not(:disabled) {
    transform: translateY(-10px) scale(1.02) !important;
    border-color: rgba(252, 211, 77, 0.6) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(252, 211, 77, 0.1) !important;
    background: rgba(30, 30, 40, 0.6) !important;
}


.fayte-card-icon {
    font-size: 4rem !important;
    transition: transform 0.3s ease;
    filter: sepia(100%) hue-rotate(5deg) saturate(150%) brightness(0.9) contrast(1.2) drop-shadow(0 0 8px rgba(252, 211, 77, 0.2));
}


.fayte-card:hover .fayte-card-icon {
    transform: scale(1.1);
    filter: sepia(100%) hue-rotate(5deg) saturate(200%) brightness(1.1) drop-shadow(0 0 12px rgba(252, 211, 77, 0.4));
}


.fayte-card-name {
    font-family: 'Cinzel', serif !important;
    color: #e2e8f0 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}


.fayte-card.fayte-amber { border-bottom: 2px solid #b45309 !important; }
.fayte-card.fayte-purple { border-bottom: 2px solid #7e22ce !important; }
.fayte-card.fayte-orange { border-bottom: 2px solid #c2410c !important; }
.fayte-card.fayte-blue { border-bottom: 2px solid #1d4ed8 !important; }
.fayte-card.fayte-teal { border-bottom: 2px solid #0d9488 !important; }
.fayte-card.fayte-cyan { border-bottom: 2px solid #0e7490 !important; }
.fayte-card.fayte-rose { border-bottom: 2px solid #be123c !important; }
.fayte-card.fayte-green { border-bottom: 2px solid #15803d !important; }
.fayte-card.fayte-yellow { border-bottom: 2px solid #a16207 !important; }
.fayte-card.fayte-red { border-bottom: 2px solid #b91c1c !important; }
.fayte-card.fayte-slate { border-bottom: 2px solid #64748b !important; }
.fayte-card.fayte-sky { border-bottom: 2px solid #0369a1 !important; }


.fayte-cards-small .fayte-card {
    width: 8rem !important;
    height: 12rem !important;
    gap: 0.75rem !important;
    cursor: default !important;
}


.fayte-cards-small .fayte-card-icon {
    font-size: 2.5rem !important;
}


.fayte-cards-small .fayte-card-name {
    font-size: 0.8rem !important;
}


/* 4. FIX: Increased Ghosted Card Opacity */
.fayte-card-ghosted {
    opacity: 0.6 !important; /* Increased from 0.2 */
    filter: grayscale(100%); 
    border-color: rgba(255,255,255,0.1) !important;
}


/* Reading Box */
.fayte-reading-box {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(16px) !important;
    border-radius: 4px !important;
    padding: 3rem !important;
    border: 1px solid rgba(252, 211, 77, 0.15) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    max-width: 48rem !important;
    width: 100% !important;
    margin-top: 1rem;
    position: relative;
}


.fayte-reading-box::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(252, 211, 77, 0.1);
    pointer-events: none;
}


.fayte-reading-title {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}


.fayte-card-names {
    font-family: 'Quicksand', sans-serif !important;
    color: #e2e8f0 !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
    font-size: 1.1rem !important;
    letter-spacing: 0.05em;
    line-height: 1.6;
}


.fayte-card-inline {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    font-weight: 700 !important;
    padding: 0 0.25rem;
    background: none !important; 
    border-bottom: 1px dotted rgba(252, 211, 77, 0.4);
}


.fayte-horoscope {
    font-family: 'Quicksand', sans-serif !important;
    color: #f1f5f9 !important;
    line-height: 1.8 !important;
    font-size: 1.25rem !important;
    text-align: left !important;
    font-weight: 400 !important;
    max-width: 90%;
    margin: 0 auto !important;
}


.fayte-game-summary {
    font-family: 'Quicksand', sans-serif !important;
    color: #cbd5e1 !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
}


.fayte-loading {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 0.1em;
    color: #fcd34d !important;
    text-align: center;
}

.fayte-loading-icon {
    font-size: 4rem !important;
    margin-bottom: 1rem;
    filter: sepia(100%) hue-rotate(5deg) saturate(150%) brightness(0.9) contrast(1.2) drop-shadow(0 0 8px rgba(252, 211, 77, 0.2));
    animation: fayte-spin 2s linear infinite;
}

@keyframes fayte-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.fayte-spinner {
    font-size: 3rem !important;
    margin-bottom: 1rem;
    filter: hue-rotate(45deg) drop-shadow(0 0 10px #fcd34d);
}


/* Actions */
.fayte-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}


/* Modal */
.fayte-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}


.fayte-modal-content {
    background: #0f172a;
    border: 1px solid rgba(252, 211, 77, 0.2);
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border-radius: 4px;
    padding: 3rem;
    font-family: 'Quicksand', sans-serif;
    color: #e2e8f0 !important;
}


.fayte-modal-content p,
.fayte-modal-content label,
.fayte-modal-content li,
.fayte-challenge-description {
    color: #e2e8f0 !important;
}


.fayte-link-group label {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    margin-bottom: 0.5rem;
    display: block;
}


.fayte-modal-header h3 {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    font-size: 1.5rem;
}


.fayte-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 2rem;
    cursor: pointer;
}
.fayte-modal-close:hover { color: #fcd34d; }


/* 2. FIX: Link Box Layout & 1. FIX: Input Colors */
.fayte-link-box {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
    width: 100% !important;
    flex-wrap: nowrap !important; /* Ensure they stay on same line */
}


.fayte-link-box input {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(252, 211, 77, 0.3) !important;
    color: #fcd34d !important; /* Gold text */
    padding: 0.8rem;
    width: auto !important;
    flex-grow: 1 !important;
    font-family: 'Quicksand', sans-serif !important;
    border-radius: 4px !important;
}


.fayte-copy-link-btn {
    background: rgba(252, 211, 77, 0.2) !important;
    color: #fcd34d !important;
    border: 1px solid rgba(252, 211, 77, 0.4) !important;
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 4px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease;
}


.fayte-copy-link-btn:hover {
    background: rgba(252, 211, 77, 0.4) !important;
    color: white !important;
}


.fayte-challenge-rules {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.fayte-challenge-rules li {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fayte-challenge-rules li:last-child {
    border-bottom: none;
}

.fayte-challenge-note {
    padding: 1rem !important;
    margin: 0 0 1rem 0 !important;
    background: rgba(252, 211, 77, 0.05);
    border-radius: 4px;
    font-size: 0.95rem !important;
}


/* Challenge & Result Specifics */
.fayte-title-correct {
    color: #86efac !important;
    text-shadow: 0 0 20px rgba(134, 239, 172, 0.3) !important;
}

.fayte-title-wrong {
    color: #fca5a5 !important;
    text-shadow: 0 0 20px rgba(252, 165, 165, 0.3) !important;
}

.fayte-outcome-correct {
    color: #86efac !important;
    font-weight: 500;
}

.fayte-outcome-wrong {
    color: #fca5a5 !important;
    font-weight: 500;
}

.fayte-reading-subtitle {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    font-size: 1.4rem !important;
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

.fayte-guess-result {
    text-align: center;
}

.fayte-guess-result .fayte-card-names {
    text-align: center !important;
}

.fayte-guess-result .fayte-horoscope {
    text-align: left !important;
}


.fayte-p2-reading {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(252, 211, 77, 0.1);
    border-radius: 4px;
}


.fayte-p2-reading h4 {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}


.fayte-p2-horoscope {
    font-family: 'Quicksand', sans-serif !important;
    color: #e2e8f0 !important;
    font-size: 1.1rem;
    line-height: 1.7;
}


.fayte-consequence {
    font-family: 'Cinzel', serif !important;
    color: #fcd34d !important;
    font-style: italic !important;
    margin-top: 1.5rem !important;
    font-size: 1.1rem !important;
}


/* Copy Share Button */
.fayte-btn-copy-share {
    font-family: 'Cinzel', serif !important;
    width: 100% !important;
    padding: 1rem !important;
    font-size: 1rem !important;
    background: transparent !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
    color: #e9d5ff !important;
    margin-top: 2rem !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}


.fayte-btn-copy-share:hover {
    background: rgba(168, 85, 247, 0.1) !important;
    border-color: #a855f7 !important;
    color: white !important;
    transform: none !important;
}


.fayte-btn-copy-share.copied {
    border-color: #4ade80 !important;
    color: #4ade80 !important;
}


/* 3. FIX: Increased Share Buttons */
.fayte-share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }


.fayte-btn-sms, .fayte-btn-whatsapp, .fayte-btn-telegram, .fayte-btn-messenger, .fayte-btn-email, .fayte-btn-twitter {
    font-size: 1rem !important; /* Larger Text */
    padding: 1rem !important; /* Larger Touch Target */
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #cbd5e1 !important;
    border-radius: 4px !important;
    transition: all 0.2s ease;
}


.fayte-btn-sms:hover, .fayte-btn-whatsapp:hover, .fayte-btn-telegram:hover, .fayte-btn-messenger:hover, .fayte-btn-email:hover, .fayte-btn-twitter:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: #fcd34d !important;
    color: white !important;
    transform: translateY(-2px);
}


/* Disclaimer */
.fayte-disclaimer {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 1.25rem !important;
    color: #cbd5e1 !important;
    text-align: center !important;
    margin-top: 2rem !important;
    margin-bottom: 0 !important;
    font-style: italic;
    line-height: 1.5;
}


/* Responsive */
@media (max-width: 640px) {
    .fayte-container { padding: 1rem; }
    .fayte-title { font-size: 3rem !important; }
    .fayte-subtitle { font-size: 0.9rem !important; margin-bottom: 2rem !important; }
    .fayte-intro-text { font-size: 1.1rem !important; }
    .fayte-card { width: 8rem !important; height: 12rem !important; }
    .fayte-card-icon { font-size: 2.5rem !important; }
    .fayte-cards-small .fayte-card { width: 6rem !important; height: 9rem !important; }
    .fayte-reading-box { padding: 1.5rem !important; }
    .fayte-reading-title { font-size: 1.4rem !important; }
    .fayte-horoscope { font-size: 1.1rem !important; text-align: center !important; }
    .fayte-share-grid { grid-template-columns: repeat(2, 1fr); }
}