@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Playfair+Display:wght@700&display=swap');

:root {
    --black: #0a0a0a;
    --white: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 1.2s ease, color 1.2s ease;
    font-size: 16px;
}

h1, h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 14px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo { font-size: 22px; font-weight: 700; }

.nav-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 500;
    padding: 6px 10px;
}

/* Pages */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 70px;
}

.page.active {
    display: block;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.heart {
    font-size: 4.2rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: clamp(2.6rem, 8.5vw, 5rem);
    line-height: 1.05;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 50px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 60px;
}

.btn {
    display: block;
    background-color: var(--white);
    color: var(--black);
    padding: 18px;
    font-size: 1.22rem;
    font-weight: 600;
    border-radius: 9999px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover, .btn:active { transform: scale(1.04); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

/* Reasons */
.reasons-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.reasons-header h1 { font-size: 2.6rem; }

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 0 5% 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.reason-card {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 24px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.reason-card:active { transform: scale(0.97); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(10, 10, 10, 0.97);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 24px;
    width: 100%;
    max-width: 620px;
    padding: 40px 30px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-footer {
    margin-top: 30px;
    text-align: center;
}

/* Game */
.game-container { padding: 20px 5%; max-width: 100%; margin: 0 auto; }
.game-header h1 { font-size: 2.4rem; text-align: center; }

.status {
    font-size: 1.3rem;
    text-align: center;
    margin: 20px 0 30px;
    min-height: 40px;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
    background-color: #111;
    padding: 10px;
    border-radius: 28px;
    aspect-ratio: 1 / 1;
    width: 100%;
}

.cell {
    background-color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    cursor: pointer;
    touch-action: manipulation;
    min-height: 110px;
}

.cell:active { background-color: #222; }

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 320px;
    margin: 50px auto 0;
}

.btn-game {
    padding: 16px;
    font-size: 1.2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
}

.btn-game.outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

/* ====================== VIRTUAL HUGS ====================== */
.hugs-header {
    text-align: center;
    padding: 70px 20px 40px;
}

.hugs-header h1 { font-size: 2.6rem; }

.hugs-header p {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hugs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    padding: 0 5% 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hug-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 2.8rem;
}

.hug-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: #ff69b4;
    box-shadow: 0 15px 30px rgba(255, 105, 180, 0.2);
}

.hug-card span {
    display: block;
    margin-bottom: 12px;
    font-size: 3.2rem;
}

/* Hug Modal */
.hug-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.96);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hug-content {
    background: #111;
    border: 1px solid #444;
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 50px 30px;
    text-align: center;
    position: relative;
}

.hug-emoji {
    font-size: 6.5rem;
    margin-bottom: 20px;
    animation: hugPop 0.6s ease;
}

.hug-message {
    font-size: 1.35rem;
    line-height: 1.8;
    margin: 25px 0;
    opacity: 0.95;
}

@keyframes hugPop {
    0% { transform: scale(0.4); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ====================== PRINCESS MODE ====================== */
.princess-toggle {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 182, 193, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 182, 193, 0.6);
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.25);
}

.princess-toggle:hover {
    background: rgba(255, 182, 193, 0.3);
    transform: translateY(-50%) scale(1.08);
}

.princess-toggle.active {
    background: #ffb6c1;
    color: #5c2a3a;
    border-color: #ff69b4;
}

/* Princess Mode Theme */
body.princess-mode {
    background: linear-gradient(135deg, #fff0f5 0%, #fff 100%);
    color: #4a2c2c;
}

body.princess-mode h1,
body.princess-mode h2,
body.princess-mode h3 {
    color: #5c2a3a;
}

body.princess-mode .reason-card,
body.princess-mode .modal-content,
body.princess-mode .hug-content {
    background: #fff;
    border-color: #ffc1d0;
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.15);
    color: #4a2c2c;
}

body.princess-mode nav {
    background: rgba(255, 240, 245, 0.95);
    border-bottom: 1px solid #ffc1d0;
}

body.princess-mode .btn,
body.princess-mode .btn-game {
    background-color: #5c2a3a;
    color: #fff;
}

body.princess-mode .btn-outline,
body.princess-mode .btn-game.outline {
    background: transparent;
    border: 2px solid #5c2a3a;
    color: #5c2a3a;
}

body.princess-mode .nav-links a {
    color: #5c2a3a;
}

body.princess-mode .hug-card {
    background: #fff;
    border-color: #ffc1d0;
    color: #4a2c2c;
}

/* Curtain Animation */
.curtains {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.curtains.active {
    opacity: 1;
    visibility: visible;
}

.curtain {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, #ff69b4, #ffb6c1);
    transition: transform 2.2s cubic-bezier(0.65, 0.05, 0.35, 1);
    z-index: 1;
}

.curtain.left { left: 0; transform: translateX(-100%); }
.curtain.right { right: 0; transform: translateX(100%); }

.curtains.active .curtain.left,
.curtains.active .curtain.right {
    transform: translateX(0);
}

.curtain-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    text-align: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 1.2s ease 0.6s;
    text-shadow: 0 4px 25px rgba(0,0,0,0.5);
}

.curtains.active .curtain-text { opacity: 1; }

/* Floating hearts */
.floating-heart {
    position: fixed;
    font-size: 26px;
    color: #ff69b4;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1500;
    animation: floatHeart 4.5s linear forwards;
    text-shadow: 0 0 12px rgba(255, 105, 180, 0.6);
}

@keyframes floatHeart {
    0% { transform: translateY(100vh) scale(0.6); opacity: 0; }
    25% { opacity: 0.8; }
    75% { opacity: 0.8; }
    100% { transform: translateY(-120px) scale(1.3); opacity: 0; }
}

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