/* ============================================
   Valentine's Day Web App - Main Styles
   ============================================ */

:root {
    --color-blush: #ffb6c1;
    --color-rose: #ff4d6d;
    --color-deep-rose: #c9184a;
    --color-light: #fff5f7;
    --color-white: #ffffff;
    --color-dark: #2d1b2e;
    
    --font-display: 'Dancing Script', cursive;
    --font-body: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--color-light) 0%, #ffe4ec 100%);
    color: var(--color-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes particleFloat {
    0% {
        opacity: 0.5;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

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

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

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 77, 109, 0.5),
                     0 0 20px rgba(255, 77, 109, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 77, 109, 0.8),
                     0 0 40px rgba(255, 77, 109, 0.6);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    0%, 49% {
        border-right-color: var(--color-rose);
    }
    50%, 100% {
        border-right-color: transparent;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(800px) rotateZ(720deg);
        opacity: 0;
    }
}

@keyframes buttonMove {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, 30px); }
    50% { transform: translate(-40px, 20px); }
    75% { transform: translate(40px, -30px); }
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.page.fade-in {
    animation: fadeIn 1s ease-in;
}

.page.fade-out {
    animation: fadeOut 1s ease-out forwards;
}

/* Animated background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-light) 0%, #ffe4ec 100%);
    z-index: -2;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 77, 109, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.animated-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 24, 74, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite 1s;
}

/* Floating hearts container */
.hearts-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

.heart {
    position: absolute;
    font-size: 2rem;
    animation: floatHeart linear infinite;
    pointer-events: none;
}

/* ============================================
   BUTTONS
   ============================================ */

button {
    font-family: var(--font-body);
    border: none;
    border-radius: 50px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-deep-rose) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 77, 109, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-rose);
    border: 2px solid var(--color-rose);
    font-weight: 700;
}

.btn-secondary:hover {
    background: var(--color-rose);
    color: white;
    transform: translateY(-2px);
}

.btn-yes {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    font-size: 18px;
    padding: 15px 40px;
}

.btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.btn-no {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    font-size: 18px;
    padding: 15px 40px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-no:hover {
    transform: translateY(-2px);
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

.card h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-rose);
    margin-bottom: 15px;
    line-height: 1.2;
}

.card p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ============================================
   LANDING PAGE (index.php)
   ============================================ */

.landing-card {
    text-align: center;
}

.landing-card .emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.landing-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.landing-card p {
    font-size: 1rem;
    margin-bottom: 40px;
    color: #777;
}

.btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SLIDESHOW (page2.php)
   ============================================ */

.slideshow-container {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin: auto;
}

.slide {
    display: none;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.slide.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.slide img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.slide-caption {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-rose);
    margin-top: 30px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.slideshow-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.slide-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 77, 109, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--color-rose);
    transform: scale(1.3);
}

.slideshow-message {
    margin-top: 50px;
    text-align: center;
    animation: fadeInUp 1s ease 0.5s both;
}

.slideshow-message h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-rose);
    margin-bottom: 20px;
}

/* ============================================
   FUNNY TRAP PAGE (page3.php)
   ============================================ */

.question-card {
    text-align: center;
}

.question-card h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease;
}

.response-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn-response {
    font-size: 1.3rem;
    padding: 18px 50px;
    min-width: 150px;
}

/* ============================================
   PROPOSAL PAGE (page4.php)
   ============================================ */

.proposal-container {
    text-align: center;
    width: 100%;
}

.typewriter-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-deep-rose);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: pre-wrap;
}

.big-question {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--color-rose);
    margin: 60px 0;
    animation: glowPulse 2s ease-in-out infinite;
    letter-spacing: 2px;
}

.big-question .emoji {
    font-size: 3.5rem;
    display: inline-block;
    margin: 0 20px;
}

.final-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

/* ============================================
   SUCCESS PAGE (success.php)
   ============================================ */

.success-container {
    text-align: center;
    position: relative;
    z-index: 10;
}

.success-container h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: glowPulse 2s ease-in-out infinite;
}

.success-container p {
    font-size: 1.5rem;
    color: var(--color-rose);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.confetti-piece {
    position: fixed;
    pointer-events: none;
    z-index: 9;
}

/* Fireworks */
.firework {
    position: fixed;
    pointer-events: none;
}

.spark {
    position: absolute;
    background: radial-gradient(circle, var(--color-rose) 0%, transparent 70%);
    border-radius: 50%;
}

/* Heart rain */
.heart-rain {
    position: fixed;
    font-size: 3rem;
    pointer-events: none;
    animation: floatHeart 3s linear forwards;
    z-index: 8;
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
}

.loader::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 4px;
    border-radius: 50%;
    border: 4px solid var(--color-rose);
    border-color: var(--color-rose) transparent var(--color-rose) transparent;
    animation: spin 1.2s linear infinite;
}

.loading-message {
    text-align: center;
    margin-top: 20px;
}

.loading-message p {
    font-family: var(--font-display);
    color: var(--color-rose);
    font-size: 1.3rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .card {
        padding: 30px 20px;
    }

    .card h1 {
        font-size: 1.8rem;
    }

    .card p {
        font-size: 1rem;
    }

    .slide {
        min-height: 400px;
    }

    .slide img {
        max-height: 300px;
    }

    .slide-caption {
        font-size: 1.3rem;
    }

    .big-question {
        font-size: 2.5rem;
    }

    .big-question .emoji {
        font-size: 2rem;
        margin: 0 10px;
    }

    .btn-response {
        font-size: 1.1rem;
        padding: 15px 35px;
        min-width: 120px;
    }

    button {
        padding: 10px 25px;
        font-size: 14px;
    }

    .btn-container {
        gap: 10px;
    }

    .response-buttons {
        gap: 10px;
    }

    .final-buttons {
        gap: 10px;
    }

    .success-container h1 {
        font-size: 2.5rem;
    }

    .success-container p {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px 15px;
    }

    .card h1 {
        font-size: 1.5rem;
    }

    .card p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .big-question {
        font-size: 2rem;
        margin: 40px 0;
    }

    .big-question .emoji {
        font-size: 1.5rem;
        margin: 0 5px;
    }

    button {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .btn-container {
        flex-direction: column;
    }

    .response-buttons {
        flex-direction: column;
    }

    .final-buttons {
        flex-direction: column;
    }

    .slide {
        min-height: 300px;
    }

    .slide img {
        max-height: 200px;
    }

    .slide-caption {
        font-size: 1.1rem;
    }

    .success-container h1 {
        font-size: 2rem;
    }

    .success-container p {
        font-size: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

.cursor-default {
    cursor: default;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
}
