/* ============================================
   DATE CONFIRMATION SITE - ROMANTIC THEME
   Premium Icon Edition
   ============================================ */

:root {
    --primary: #ff4b6e;
    --primary-dark: #d63056;
    --primary-light: #ff7eb3;
    --secondary: #ff9a9e;
    --accent: #fad0c4;
    --bg-gradient-1: #ffecd2;
    --bg-gradient-2: #fcb69f;
    --bg-gradient-3: #ff9a9e;
    --text-dark: #2d1b2e;
    --text-light: #fff;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(255, 75, 110, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.script-font {
    font-family: 'Dancing Script', cursive;
}

/* ============================================
   LUCIDE ICON SIZING
   ============================================ */

.icon-hero {
    width: 56px;
    height: 56px;
    color: var(--primary);
    stroke-width: 1.5;
}

.btn-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
    margin-top: -2px;
    stroke-width: 2;
}

.label-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    margin-top: -2px;
    color: var(--primary);
    stroke-width: 2;
}

.detail-icon-svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    stroke-width: 1.8;
    flex-shrink: 0;
}

.icon-celebrate {
    width: 40px;
    height: 40px;
    color: var(--primary);
    stroke-width: 1.5;
}

.icon-heart-pulse {
    animation: heartbeat 0.8s ease infinite;
    color: var(--primary);
}

.icon-loader-heart {
    width: 48px;
    height: 48px;
    color: var(--primary);
    stroke-width: 1.5;
}

/* ============================================
   FLOATING HEARTS BACKGROUND
   ============================================ */

.hearts-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    animation: floatUp linear infinite;
    opacity: 0.5;
    pointer-events: none;
    color: var(--primary);
}

.floating-heart svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.45;
    }
    90% {
        opacity: 0.45;
    }
    100% {
        transform: translateY(-10vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* ============================================
   SCREENS
   ============================================ */

.screen {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    animation: fadeInUp 0.8s ease;
}

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

/* ============================================
   GLASS CARD
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow), 0 0 40px rgba(255, 154, 158, 0.15);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.planner-card {
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.planner-card::-webkit-scrollbar {
    width: 6px;
}

.planner-card::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.envelope-icon {
    margin-bottom: 10px;
    animation: bounce 2s ease infinite;
}

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

.celebration-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
    animation: bounce 1.5s ease infinite;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255, 75, 110, 0.2);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-dark);
    opacity: 0.8;
    margin-bottom: 5px;
    font-weight: 300;
}

.question-text {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin: 30px 0;
    line-height: 1.4;
}

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

.button-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 80px;
    position: relative;
}

.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-yes {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 20px rgba(255, 75, 110, 0.4);
    transform: scale(1);
}

.btn-yes:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(255, 75, 110, 0.5);
}

.btn-yes::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.btn-no {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-dark);
    border: 2px solid rgba(255, 75, 110, 0.3);
    transition: all 0.3s ease;
}

.btn-no:hover {
    background: rgba(255, 255, 255, 0.6);
}

.btn-no.running {
    transition: all 0.2s ease;
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
    margin-top: 10px;
}

/* ============================================
   PERSUASION TEXT
   ============================================ */

.persuasion-text {
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(255, 75, 110, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 75, 110, 0.2);
    font-size: 1rem;
    color: var(--primary-dark);
    font-weight: 500;
    animation: fadeInUp 0.5s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.persuasion-text.hidden {
    display: none;
}

.persuasion-text .persuasion-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--primary);
    stroke-width: 2;
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 75, 110, 0.2);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-dark);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 75, 110, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(45, 27, 46, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff4b6e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* ============================================
   CONFIRMATION DETAILS
   ============================================ */

.confirmation-details {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    text-align: left;
    border: 1px solid rgba(255, 75, 110, 0.15);
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 75, 110, 0.1);
    font-size: 0.95rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .detail-label {
    font-weight: 600;
    color: var(--primary-dark);
    min-width: 80px;
}

.detail-row .detail-value {
    color: var(--text-dark);
    font-weight: 400;
}

/* ============================================
   COUNTDOWN
   ============================================ */

.countdown-section {
    margin-top: 25px;
}

.countdown-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.countdown {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.countdown-item {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 75, 110, 0.3);
}

.countdown-item .number {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.countdown-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-top: 4px;
    display: block;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 236, 210, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

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

.heart-loader {
    animation: heartbeat 0.8s ease infinite;
}

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

.loader-content p {
    margin-top: 15px;
    font-weight: 500;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

/* ============================================
   CONFETTI CANVAS
   ============================================ */

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */

/* Tablets */
@media (max-width: 768px) {
    .glass-card {
        padding: 32px 22px;
        border-radius: 22px;
        margin: 10px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .question-text {
        font-size: 1.5rem;
        margin: 24px 0;
    }

    .icon-celebrate {
        width: 34px;
        height: 34px;
    }

    .planner-card {
        max-height: 90vh;
    }
}

/* Mobile */
@media (max-width: 600px) {
    body {
        /* Prevent overscroll bounce on iOS */
        overscroll-behavior: none;
    }

    .screen {
        padding: 12px;
        align-items: center;
        min-height: 100dvh;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .glass-card {
        padding: 28px 18px;
        border-radius: 20px;
        margin: 0;
        max-width: 100%;
    }

    h1 {
        font-size: 1.85rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .question-text {
        font-size: 1.35rem;
        margin: 20px 0;
    }

    .envelope-icon {
        margin-bottom: 6px;
    }

    .icon-hero {
        width: 44px;
        height: 44px;
    }

    /* Bigger touch targets */
    .btn {
        padding: 14px 32px;
        font-size: 1rem;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-yes {
        padding: 14px 36px;
    }

    .btn-full {
        padding: 16px;
        font-size: 1.05rem;
        border-radius: 14px;
    }

    .button-container {
        gap: 14px;
        min-height: 60px;
    }

    /* Form optimizations */
    .form-group {
        margin-bottom: 10px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 12px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 10px;
        min-height: 44px;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .form-group textarea {
        min-height: 56px;
    }

    .planner-card {
        padding: 22px 16px;
        max-height: none;
        overflow-y: visible;
    }

    .planner-card h1 {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }

    .planner-card .subtitle {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }

    /* Celebration */
    .celebration-icons {
        gap: 12px;
        margin-bottom: 10px;
    }

    .icon-celebrate {
        width: 28px;
        height: 28px;
    }

    /* Confirmation details */
    .confirmation-details {
        padding: 18px 14px;
        margin: 14px 0;
    }

    .detail-row {
        font-size: 0.88rem;
        gap: 8px;
        padding: 7px 0;
    }

    .detail-row .detail-label {
        min-width: 65px;
        font-size: 0.82rem;
    }

    .detail-icon-svg {
        width: 17px;
        height: 17px;
    }

    /* Countdown */
    .countdown {
        gap: 8px;
    }

    .countdown-item {
        min-width: 58px;
        padding: 10px 10px;
        border-radius: 12px;
    }

    .countdown-item .number {
        font-size: 1.5rem;
    }

    .countdown-item .label {
        font-size: 0.6rem;
    }

    .countdown-section h3 {
        font-size: 1.3rem;
    }

    /* Persuasion */
    .persuasion-text {
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 12px;
        gap: 8px;
        margin-top: 16px;
    }

    .persuasion-text .persuasion-icon {
        width: 18px;
        height: 18px;
    }

    /* Floating hearts - fewer on mobile for performance */
    .floating-heart {
        opacity: 0.35;
    }
}

/* Small phones */
@media (max-width: 380px) {
    h1 {
        font-size: 1.6rem;
    }

    .question-text {
        font-size: 1.15rem;
        margin: 16px 0;
    }

    .glass-card {
        padding: 20px 14px;
    }

    .planner-card {
        padding: 18px 12px;
    }

    .button-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .countdown-item {
        min-width: 50px;
        padding: 8px 8px;
    }

    .countdown-item .number {
        font-size: 1.3rem;
    }
}

/* Handle notch / dynamic island */
@supports (padding: max(0px)) {
    .screen {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .screen {
        align-items: flex-start;
        padding-top: 10px;
    }

    .glass-card {
        padding: 20px 18px;
    }

    .envelope-icon {
        margin-bottom: 4px;
    }

    .icon-hero {
        width: 32px;
        height: 32px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .question-text {
        margin: 12px 0;
        font-size: 1.2rem;
    }

    .planner-card {
        max-height: calc(100vh - 20px);
    }
}

/* ============================================
   SPARKLE CURSOR (desktop only)
   ============================================ */

.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    animation: sparkleAnim 0.8s ease forwards;
    color: var(--primary);
}

.sparkle svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-30px);
    }
}

/* Disable sparkle cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .sparkle {
        display: none !important;
    }
}
