@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #030406;
    --accent-gold: #c5a059;
    --accent-gold-bright: #f1d29d;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 253, 249, 0.7); /* Slightly warmer text */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;
    --shadow-premium: 0 40px 100px rgba(0, 0, 0, 0.8);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: var(--font-sans) !important; /* Force global sans font everywhere */
}

h1, h2, h3, .year-label, .modal-title-label, #modal-question {
    font-family: var(--font-heading) !important; /* Force heading font for specific elements */
}

body { background-color: var(--bg-color); color: var(--text-primary); font-family: var(--font-sans); min-height: 100vh; overflow-x: hidden; line-height: 1.6; }

.hidden { display: none !important; }

/* Stars background stays same */
.stars-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background: radial-gradient(circle at 50% 50%, #0d121d 0%, #030406 100%); }
.star { position: absolute; background: white; border-radius: 50%; animation: twinkle linear infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }

/* UNIVERSAL GOLD BUTTON v14 ULTIMATE */
.gold-btn {
    background: linear-gradient(135deg, #c5a059 0%, #ecd09e 50%, #c5a059 100%) !important;
    color: #000 !important;
    border: none !important;
    padding: 20px 60px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 4px !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1) !important;
    box-shadow: 0 15px 35px rgba(197, 160, 89, 0.3) !important;
    font-family: var(--font-sans) !important;
    display: inline-block !important;
    text-decoration: none !important;
    text-align: center !important;
}

.gold-btn:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(197, 160, 89, 0.5) !important;
    filter: brightness(1.1) !important;
}

.gold-btn:active {
    transform: translateY(-2px) !important;
}

/* Secondary Version (v14) */
.secondary-outline-btn {
    background: transparent !important;
    color: var(--accent-gold) !important;
    border: 2px solid var(--accent-gold) !important;
    padding: 16px 45px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-size: 0.85rem !important;
}
.secondary-outline-btn:hover {
    background: rgba(197, 160, 89, 0.1) !important;
    border-color: var(--accent-gold-bright) !important;
    color: var(--accent-gold-bright) !important;
    transform: translateY(-3px) !important;
}

/* Welcome Screen */
.welcome-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 5000; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, #0a111a 0%, #030406 100%); transition: opacity 0.8s, transform 0.8s; }
.welcome-screen.fade-out { opacity: 0; transform: scale(1.1); pointer-events: none; }
.welcome-content { max-width: 800px; text-align: center; padding: 2rem; position: relative; }
.welcome-hero-container { width: 100%; margin-bottom: 2rem; display: flex; justify-content: center; }
.welcome-hero-img { width: 280px; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.welcome-badge { display: inline-block; color: var(--accent-gold); border: 1px solid var(--accent-gold); padding: 10px 30px; border-radius: 40px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 2.5rem; }
.welcome-content h1 { font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 400; line-height: 1.1; margin-bottom: 1.5rem; }
.welcome-content h1 span { color: var(--accent-gold); display: block; font-style: italic; font-weight: 700; margin-top: 5px; }
.welcome-content p { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; margin-bottom: 3.5rem; max-width: 550px; margin-left: auto; margin-right: auto; }

/* Main Content */
.app-container { max-width: 1400px; margin: 0 auto; padding: 6rem 2rem; }
.main-header { text-align: center; margin-bottom: 5rem; }
.main-header h1 { font-family: var(--font-heading); font-size: 4rem; font-weight: 300; letter-spacing: -1px; }
.main-header h1 span { color: var(--accent-gold); font-weight: 700; }
.main-header p { color: var(--text-secondary); letter-spacing: 2px; text-transform: uppercase; font-size: 0.85rem; margin-top: 1rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 3rem; margin-bottom: 5rem; }

/* Cards stays same */
.card-outer { perspective: 1200px; height: 220px; }
.card-inner { width: 100%; height: 100%; transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1); transform-style: preserve-3d; }
.card-outer.unlocked .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--glass-border); transition: all 0.3s; }
.card-front { background: var(--glass-bg); backdrop-filter: blur(15px); transition: all 0.4s; }
.card-outer:hover .card-front { background: rgba(255,255,255,0.06); border-color: var(--accent-gold); }

/* Discovery Card Special Styles v23 */
.card-outer.type-discovery:not(.unlocked) .card-front {
    border-color: rgba(197, 160, 89, 0.2);
}



.card-outer:hover { transform: translateY(-8px); }

.year-label { font-size: 3rem; font-family: var(--font-heading); font-weight: 700; color: #fff; }
.type-badge { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-gold); font-weight: 600; margin-top: 2px; }
.card-outer.unlocked .type-badge::after { content: ' ✨'; }

.card-back { transform: rotateY(180deg); background: #080a0f; overflow: hidden; border: 1.5px solid var(--accent-gold); }
.memory-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1); }
.memory-text { position: absolute; bottom: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,1) 0%, transparent 100%); font-size: 0.85rem; text-align: center; font-style: italic; font-weight: 300; }

/* Modal Design v14 FIXED */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10000; background: rgba(0,0,0,0.98); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(20px); }

.modal-content { 
    background: #080a0f; 
    border: 1px solid var(--glass-border); 
    border-radius: 32px; 
    width: 95%; 
    max-width: 1100px; 
    height: 90vh; /* Fixed height for reliable internal scrolling */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; 
    box-shadow: var(--shadow-premium); 
}

.close-modal { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.05); border: none; color: #fff; font-size: 2rem; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 100; transition: all 0.3s; }
.close-modal:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

/* Quiz Section v20 CENTERED */
#quiz-section { 
    padding: 2rem; 
    flex: 1; /* Take full height of modal-content to allow centering */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; /* VRTICAL CENTERING FIXED */
}
.modal-title-label { color: var(--accent-gold); letter-spacing: 12px; font-size: 0.7rem; margin-bottom: 2rem; text-transform: uppercase; font-weight: 700; opacity: 0.8; }
#modal-question { 
    font-family: var(--font-sans) !important; /* Change to clean sans font (v22) */
    font-size: 1.2rem; 
    font-weight: 500; 
    line-height: 1.5; 
    font-style: normal; /* Remove italics (v22) */
    color: #fff; 
    margin-bottom: 3rem; 
    max-width: 800px; 
    text-align: center; 
    opacity: 0.9;
}

#answer-input { width: 100%; max-width: 400px; background: rgba(255,255,255,0.03); border: 1.5px solid var(--glass-border); padding: 20px; border-radius: 16px; color: #fff; text-align: center; font-size: 1.4rem; margin-bottom: 2rem; outline: none; transition: all 0.3s; }
#answer-input:focus { border-color: var(--accent-gold); background: rgba(255,255,255,0.06); }

/* Success Section Redesign v19 */
#success-section { display: flex; flex-direction: column; height: 100%; width: 100%; overflow: hidden; }
.success-header { padding: 2rem 2rem 1rem; text-align: center; }
.success-badge { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 5px; color: var(--accent-gold); margin-bottom: 0.5rem; display: block; font-weight: 600; }
#success-year-title { font-family: var(--font-heading); font-size: 3rem; font-weight: 800; color: #fff; }

.full-memory-container { 
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 3rem 100px; /* Reduced top padding */
    flex: 1;
    overflow-y: hidden; /* Hide scrollbar if content fits (v20) */
}

/* Enable scrolling only if needed, without the scrollbar gutter if possible */
.full-memory-container::-webkit-scrollbar { display: none; }
.full-memory-container { -ms-overflow-style: none; scrollbar-width: none; }

.img-wrapper { 
    flex: 1.6; 
    max-width: 65%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#success-img { 
    width: 100%; 
    max-height: 65vh; 
    object-fit: contain; 
    border-radius: 20px; 
    box-shadow: 0 25px 60px rgba(0,0,0,0.6); 
    border: 1px solid var(--glass-border);
}

.full-memory-text-box { 
    flex: 1;
    max-width: 35%;
    background: rgba(255,255,255,0.02); 
    padding: 2rem; 
    border-radius: 20px; 
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

#success-text { 
    font-family: var(--font-sans); 
    font-size: 0.92rem; 
    line-height: 1.8; 
    color: var(--text-secondary); 
    font-weight: 400; 
    text-align: left; 
}
#success-text::before { content: '❤️ '; color: var(--accent-gold); }

/* STICKY FOOTER BUTTON v14 */
.modal-footer-sticky { 
    padding: 2rem 4rem 3.5rem; 
    background: linear-gradient(to top, #080a0f 80%, transparent); 
    text-align: center; 
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    justify-content: center;
}

/* BLUR EFFECTS */
.image-reveal-blur { filter: blur(40px); cursor: pointer; transition: filter 0.8s ease; }
.image-reveal-blur.revealed,
.revealed .image-reveal-blur { filter: blur(0) !important; }

.blur-reveal-trigger { position: relative; cursor: pointer; overflow: hidden; }
.blur-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(45px); display: flex; align-items: center; justify-content: center; color: var(--accent-gold); font-weight: 700; font-size: 1.3rem; z-index: 5; transition: opacity 0.6s ease; pointer-events: none; }
.blur-reveal-trigger.revealed .blur-overlay { opacity: 0; pointer-events: none; }

/* FINAL SCREENS FIXED SCALE v14 */
.final-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, #0a111a 0%, #030406 100%); z-index: 20000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(25px); padding: 2rem; }

.wishes-content { max-width: 800px; text-align: center; transform: scale(0.85); display: flex; flex-direction: column; align-items: center; }
.heart-animation { font-size: 5rem; margin-bottom: 1rem; animation: pulse 1s infinite; }
.wishes-title { font-family: var(--font-heading); font-size: 4rem; color: var(--accent-gold); margin-bottom: 2rem; }
.wishes-text { font-size: 1.3rem; line-height: 1.6; color: var(--text-secondary); font-style: italic; margin-bottom: 3.5rem; }

/* Video Screen v15 */
.videos-content { width: 100%; max-width: 1200px; text-align: center; display: flex; flex-direction: column; align-items: center; padding: 2rem; }
.videos-label { color: var(--accent-gold); letter-spacing: 12px; font-size: 0.8rem; margin-bottom: 1.5rem; text-transform: uppercase; font-weight: 700; opacity: 0.8; }
.videos-title { font-family: var(--font-heading); font-size: clamp(3rem, 8vw, 4.5rem); color: #fff; margin-bottom: 4rem; }

.videos-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 3rem; 
    width: 100%; 
    margin-bottom: 5rem;
}

.video-wrapper { 
    position: relative; 
    width: 100%; 
    max-width: 320px; /* Portrait specific width */
    margin: 0 auto;
    background: #000; 
    border-radius: 24px; 
    overflow: hidden; 
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.video-wrapper:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-gold);
    box-shadow: 0 40px 100px rgba(197, 160, 89, 0.2);
}

.video-wrapper video { 
    width: 100%; 
    display: block;
    aspect-ratio: 9/16; /* Format pionowy */
    object-fit: cover;
}

.voucher-card { width: 500px; margin: 0 auto 4rem; }
.voucher-header-outside { font-size: 0.8rem; letter-spacing: 12px; color: var(--accent-gold); margin-bottom: 1.5rem; font-weight: 700; }
.voucher-inner { padding: 2px; border-radius: 40px; background: linear-gradient(135deg, #c5a059 0%, #ecd09e 50%, #c5a059 100%); }
.voucher-reveal-content { background: #080a0f; border-radius: 38px; padding: 4rem 3rem; text-align: center; }
.voucher-amount { font-family: var(--font-heading); font-size: 4.5rem; font-weight: 900; color: #fff; margin-bottom: 0.5rem; }

.author-final-content { text-align: center; transform: scale(0.9); display: flex; flex-direction: column; align-items: center; }
.final-author-photo { width: 450px; height: 450px; border-radius: 50%; border: 8px solid var(--accent-gold); box-shadow: 0 0 150px rgba(197, 160, 89, 0.4); margin: 0 auto 3rem; position: relative; overflow: hidden; }
.final-author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-name-final { font-family: var(--font-heading); font-size: 4.5rem; color: var(--accent-gold); margin-bottom: 2rem; }

/* Mobile Optimization v14 */
@media (max-width: 1024px) {
    .full-memory-container { flex-direction: column; padding: 0 2rem 2rem; gap: 2rem; }
    .img-wrapper, .full-memory-text-box { max-width: 100%; }
    #success-img { max-height: 350px; }
}
@media (max-width: 768px) {
    .wishes-content { transform: scale(0.7); }
    .videos-grid { grid-template-columns: 1fr; gap: 2rem; }
    .videos-title { margin-bottom: 2rem; }
    .voucher-card { width: 320px; }
    .final-author-photo { width: 300px; height: 300px; }
    .full-memory-container { padding: 1.5rem 1.5rem 80px; }
    #success-img { max-height: 50vh; }
}

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