/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #0a0612;
    --bg-dark: #110b1f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);

    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;

    --pink-400: #f472b6;
    --pink-500: #ec4899;

    --purple-400: #c084fc;
    --purple-500: #a855f7;

    --gold: #fbbf24;

    --text-primary: #faf5ff;
    --text-secondary: rgba(250, 245, 255, 0.65);
    --text-muted: rgba(250, 245, 255, 0.4);

    --gradient-main: linear-gradient(135deg, #f43f5e, #ec4899, #a855f7);
    --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
                   radial-gradient(ellipse at 50% 80%, rgba(244, 63, 94, 0.1) 0%, transparent 50%);

    --font-display: 'Dancing Script', cursive;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* ==================== FLOATING HEARTS BG ==================== */
.hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    color: var(--rose-500);
    opacity: 0;
    animation: floatHeart linear forwards;
    filter: blur(0.5px);
    pointer-events: none;
}

@keyframes floatHeart {
    0% { opacity: 0; transform: translateY(100vh) rotate(0deg) scale(0.5); }
    10% { opacity: 0.6; }
    90% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-10vh) rotate(360deg) scale(1); }
}

/* ==================== LOCK SCREEN ==================== */
.lock-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    background-image: var(--gradient-bg);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.lock-screen.unlocked {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.lock-container {
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 0.8s var(--ease-out);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--rose-400);
    transition: all 0.5s var(--ease-out);
}

.lock-icon.unlocking {
    background: var(--rose-500);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 0 40px rgba(244, 63, 94, 0.5);
}

.lock-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.lock-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

/* PIN Input */
.password-wrapper {
    max-width: 300px;
    margin: 0 auto;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 2rem;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--rose-400);
    background: transparent;
    transition: all 0.3s var(--ease-bounce);
}

.pin-dot.filled {
    background: var(--rose-400);
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
    transform: scale(1.15);
}

.pin-dot.error {
    border-color: #ef4444;
    background: #ef4444;
    animation: dotShake 0.5s var(--ease-out);
}

@keyframes dotShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 260px;
    margin: 0 auto;
}

.pin-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pin-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--rose-400);
    transform: scale(1.05);
}

.pin-btn:active {
    transform: scale(0.95);
    background: rgba(244, 63, 94, 0.2);
}

.pin-btn-empty { visibility: hidden; }
.pin-btn-delete { color: var(--rose-400); }

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-out);
}

.error-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    display: none;
    position: relative;
    z-index: 1;
}

.main-content.visible {
    display: block;
    animation: contentReveal 1s var(--ease-out);
}

@keyframes contentReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.2) 0%, rgba(168, 85, 247, 0.1) 40%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 600px;
}

.hero-heart-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    color: var(--rose-500);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.hero-heart-icon svg { width: 100%; height: 100%; }

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

.hero-names {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.name {
    display: inline-block;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: nameReveal 1s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.name-1 { animation-delay: 0.3s; }
.name-2 { animation-delay: 0.7s; }

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

.ampersand {
    display: inline-block;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--rose-400);
    margin: 0 0.5rem;
    font-size: 3rem;
    animation: nameReveal 1s var(--ease-out) 0.5s forwards;
    opacity: 0;
}

.hero-date {
    color: var(--text-secondary);
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 2.5rem;
    animation: nameReveal 1s var(--ease-out) 1s forwards;
    opacity: 0;
}

/* ==================== COUNTER ==================== */
.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.counter-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.8rem 0.8rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.counter-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 20px;
}

.counter-card:hover::before { opacity: 0.08; }

.counter-card:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 20px 40px rgba(244, 63, 94, 0.1);
}

.counter-value {
    font-family: var(--font-body);
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

.counter-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.milestone-info {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.3rem;
    min-height: 2rem;
    margin-bottom: 1rem;
}

/* Scroll Hint */
.scroll-hint {
    margin-top: 1rem;
    color: var(--text-muted);
    animation: bobbing 2s ease-in-out infinite;
    opacity: 0;
    animation: nameReveal 1s var(--ease-out) 1.5s forwards, bobbing 2s ease-in-out infinite 2s;
}

@keyframes bobbing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ==================== SECTION SHARED ==================== */
.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: center;
}

/* ==================== ANNIVERSARY COUNTDOWN ==================== */
.anniversary-section {
    padding: 4rem 1.5rem;
    position: relative;
    background-image: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.06) 0%, transparent 60%);
}

.anniversary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.anniversary-card {
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 18px;
    padding: 1.5rem 0.8rem;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s var(--ease-out);
}

.anniversary-card:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 15px 30px rgba(251, 191, 36, 0.08);
}

.anniversary-value {
    font-family: var(--font-body);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
}

.anniversary-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.4rem;
}

.anniversary-celebration {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    display: none;
    animation: celebrationPop 0.6s var(--ease-bounce);
}

.anniversary-celebration.active {
    display: block;
}

@keyframes celebrationPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==================== PHOTO GALLERY ==================== */
.gallery-section {
    padding: 4rem 1.5rem;
    position: relative;
    background-image: radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.06) 0%, transparent 60%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.3s var(--ease-out);
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--rose-400);
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 5;
}

.gallery-item:hover .gallery-delete,
.gallery-item:active .gallery-delete {
    opacity: 1;
}

.gallery-delete:hover {
    background: rgba(239, 68, 68, 0.8);
}

/* Upload Button */
.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem auto 0;
    padding: 0.9rem 2rem;
    border-radius: 14px;
    background: var(--glass);
    border: 1px dashed rgba(244, 63, 94, 0.4);
    color: var(--rose-400);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
    max-width: 300px;
}

.upload-btn:hover,
.upload-btn:active {
    background: rgba(244, 63, 94, 0.1);
    border-color: var(--rose-400);
    transform: scale(1.02);
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.gallery-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    opacity: 0.5;
}

.gallery-empty-hint {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 75vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    padding: 2rem 1.5rem 3rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

/* ==================== INSTALL BANNER ==================== */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: rgba(17, 11, 31, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    animation: slideUp 0.5s var(--ease-out);
}

.install-banner.show {
    display: flex;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.install-banner p {
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
}

.install-btn {
    background: var(--gradient-main);
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

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

.install-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
}

/* ==================== SCROLL ANIMATIONS ==================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== RESPONSIVE (MOBILE) ==================== */
@media (max-width: 768px) {
    .lock-title { font-size: 2rem; }
    .lock-icon { width: 68px; height: 68px; }

    .pin-btn { width: 64px; height: 64px; font-size: 1.25rem; }
    .pin-pad { gap: 10px; max-width: 230px; }

    .hero-names { font-size: 2.8rem; }
    .ampersand { font-size: 2rem; }

    .counter-grid { gap: 0.7rem; }
    .counter-card { border-radius: 16px; padding: 1.3rem 0.5rem; }
    .counter-value { font-size: 2rem; }
    .counter-label { font-size: 0.65rem; letter-spacing: 1.5px; }

    .hero-heart-icon { width: 45px; height: 45px; margin-bottom: 1.5rem; }
    .hero-date { font-size: 1rem; margin-bottom: 2rem; }
    .hero-glow { width: 350px; height: 350px; }

    .section-title { font-size: 1.8rem; }

    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }

    .anniversary-value { font-size: 1.8rem; }
    .anniversary-card { padding: 1.2rem 0.5rem; border-radius: 14px; }
}

@media (max-width: 380px) {
    .hero-names { font-size: 2.2rem; }
    .ampersand { font-size: 1.6rem; margin: 0 0.3rem; }

    .counter-value { font-size: 1.7rem; }
    .counter-card { padding: 1rem 0.3rem; border-radius: 12px; }
    .counter-label { font-size: 0.6rem; }

    .pin-btn { width: 56px; height: 56px; font-size: 1.1rem; }
    .pin-pad { gap: 8px; max-width: 210px; }

    .lock-title { font-size: 1.8rem; }
    .milestone-info { font-size: 1.1rem; }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(244, 63, 94, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(244, 63, 94, 0.5); }
