@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&amp;family=Playfair+Display:wght@700&amp;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.5s ease, color 1.5s ease;
}

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: 16px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 6px 10px;
    transition: all 0.3s ease;
}

.made-for {
    font-size: 18px;
    opacity: 0.7;
}

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

.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.5rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: clamp(2.8rem, 9vw, 5.5rem);
    line-height: 1.05;
    margin-bottom: 20px;
}

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

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

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

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

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

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

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

.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: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

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

.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;
}

/* Game */
.game-container {
    padding: 20px 5%;
    max-width: 100%;
    margin: 0 auto;
}

.game-header h1 {
    font-size: 2.6rem;
    text-align: center;
}

.status {
    font-size: 1.35rem;
    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.8rem;
    cursor: pointer;
    touch-action: manipulation;
}

.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;
}

/* ====================== PRINCESS MODE ====================== */
.princess-toggle {
    position: fixed;
    right: 25px;
    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 24px;
    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);
    white-space: nowrap;
}

.princess-toggle:hover {
    background: rgba(255, 182, 193, 0.3);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 12px 30px rgba(255, 105, 180, 0.4);
}

.princess-toggle.active {
    background: #ffb6c1;
    color: #5c2a3a;
    border-color: #ff69b4;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.5);
}

/* Princess Mode Theme + Fixed Visibility */
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 {
    background: #fff;
    border-color: #ffc1d0;
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.15);
}

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

/* Fix buttons and nav links in Princess Mode */
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;
    transition: all 0.3s ease;
}

body.princess-mode .nav-links a:hover {
    color: #ff69b4;
    text-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
}

/* Advanced 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);
    z-index: 1;
    transition: transform 2.2s cubic-bezier(0.65, 0.05, 0.35, 1);
    overflow: hidden;
}

.curtain.left {
    left: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0,0,0,0.3);
}

.curtain.right {
    right: 0;
    transform: translateX(100%);
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

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

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

.curtain-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    text-align: center;
    z-index: 2;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s;
    text-shadow: 0 4px 25px rgba(0,0,0,0.5);
    max-width: 90%;
}

.curtains.active .curtain-text {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Advanced Floating Hearts */
.floating-heart {
    position: fixed;
    font-size: 28px;
    color: #ff69b4;
    opacity: 0.75;
    pointer-events: none;
    z-index: 1500;
    animation: floatHeart 5s linear forwards;
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.7);
}

@keyframes floatHeart {
    0% {
        transform: translateY(110vh) scale(0.4) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.85;
    }
    85% {
        opacity: 0.85;
    }
    100% {
        transform: translateY(-80px) scale(1.25) rotate(25deg);
        opacity: 0;
    }
}

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