/* ===================================
   KALIANIA - Perfect & Beautiful
   =================================== */

/* Variables */
:root {
    /* Colors */
    --pink-primary: #f0b2d1;
    --pink-light: #fce4ec;
    --pink-accent: #e91e63;
    --pink-soft: #ffb3d9;
    --pink-muted: #d8869f;
    
    --text-primary: #3d2c3a;
    --text-secondary: #7a5f76;
    --text-tertiary: #a88fa5;
    
    --white: #ffffff;
    --white-soft: rgba(255, 255, 255, 0.98);
    --white-subtle: rgba(255, 255, 255, 0.92);
    
    /* Timing */
    --duration-fast: 0.3s;
    --duration-medium: 0.6s;
    --duration-slow: 1.2s;
    --duration-ultra: 2.4s;
    
    /* Easing */
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-elegant: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Cormorant', serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        #fce4ec 0%,
        #f8d4e3 20%, 
        var(--pink-primary) 50%, 
        #e8a4c0 80%,
        #dda0bb 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    padding: var(--space-md);
    overflow-x: hidden;
    position: relative;
}

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

/* Ambient Background Effects */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255, 182, 193, 0.2) 0%, transparent 50%);
    pointer-events: none;
    animation: ambientPulse 12s ease-in-out infinite;
    z-index: 0;
}

@keyframes ambientPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Delicate Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 2px, transparent 2px);
    background-size: 60px 60px, 90px 90px, 120px 120px;
    background-position: 0 0, 30px 30px, 60px 60px;
    pointer-events: none;
    opacity: 0.7;
    animation: patternDrift 60s linear infinite;
    z-index: 0;
}

@keyframes patternDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Ambient Glow Effect */
.ambient-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 182, 193, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(255, 160, 200, 0.25) 0%, transparent 60%);
    animation: glowShift 20s ease-in-out infinite;
}

@keyframes glowShift {
    0%, 100% { 
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.1) translate(20px, -20px);
        opacity: 0.6;
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
    animation: floatIn var(--duration-ultra) var(--ease-elegant);
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Card */
.card {
    background: var(--white-soft);
    backdrop-filter: blur(40px) saturate(1.1);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 0 1px rgba(255, 255, 255, 0.9) inset;
    position: relative;
    transition: transform 0.6s var(--ease-smooth);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent
    );
    opacity: 0.8;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 35px 100px rgba(0, 0, 0, 0.14),
        0 15px 40px rgba(0, 0, 0, 0.1),
        0 0 2px rgba(255, 255, 255, 1) inset;
}

/* Card Header */
.card-header {
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    text-align: center;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 250, 252, 0.9) 100%
    );
    position: relative;
}

.sparkles {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: var(--space-sm);
}

.sparkle {
    width: 5px;
    height: 5px;
    background: linear-gradient(135deg, var(--pink-accent), var(--pink-soft));
    border-radius: 50%;
    display: block;
    animation: sparkleFloat 5s ease-in-out infinite;
    box-shadow: 0 0 16px rgba(233, 30, 99, 0.5), 0 0 24px rgba(255, 182, 193, 0.3);
    position: relative;
}

.sparkle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 60%);
    opacity: 0;
    animation: sparkleShine 5s ease-in-out infinite;
}

.sparkle:nth-child(1) { 
    animation-delay: 0s; 
}
.sparkle:nth-child(1)::before { 
    animation-delay: 0s; 
}

.sparkle:nth-child(2) { 
    animation-delay: 1.6s; 
}
.sparkle:nth-child(2)::before { 
    animation-delay: 1.6s; 
}

.sparkle:nth-child(3) { 
    animation-delay: 3.2s; 
}
.sparkle:nth-child(3)::before { 
    animation-delay: 3.2s; 
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-4px) scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) scale(1.6) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-4px) scale(1.2) rotate(270deg);
        opacity: 0.8;
    }
}

@keyframes sparkleShine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.site-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    color: var(--pink-accent);
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 2px 12px rgba(233, 30, 99, 0.15);
    animation: titleReveal 2s var(--ease-elegant) 0.3s backwards;
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Card Body */
.card-body {
    padding: var(--space-xxl) var(--space-xl);
    background: linear-gradient(180deg, 
        rgba(255, 250, 252, 0.9) 0%, 
        var(--white-soft) 100%
    );
}

.message {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.message-line {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.15rem, 3vw, 1.4rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 2px;
    line-height: 1.8;
    margin: 0;
    opacity: 0;
    animation: messageReveal 2.2s var(--ease-elegant) 0.8s forwards;
}

.message-main {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 600;
    color: var(--pink-accent);
    letter-spacing: 1px;
    line-height: 1.2;
    margin: 0;
    text-shadow: 
        0 2px 16px rgba(233, 30, 99, 0.2),
        0 4px 32px rgba(233, 30, 99, 0.1);
    opacity: 0;
    animation: messageReveal 2.4s var(--ease-elegant) 1.2s forwards, textGlow 8s ease-in-out 4s infinite;
    position: relative;
    transition: transform 0.4s var(--ease-smooth);
    cursor: default;
}

.message-main:hover {
    transform: scale(1.02);
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 
            0 2px 16px rgba(233, 30, 99, 0.2),
            0 4px 32px rgba(233, 30, 99, 0.1);
    }
    50% {
        text-shadow: 
            0 2px 20px rgba(233, 30, 99, 0.4),
            0 4px 40px rgba(233, 30, 99, 0.2),
            0 0 60px rgba(255, 182, 193, 0.2);
    }
}

.message-main::before,
.message-main::after {
    content: '✧';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--pink-soft);
    opacity: 0;
    animation: starAppear 1.5s var(--ease-elegant) 2.5s forwards;
}

.message-main::before {
    left: -32px;
}

.message-main::after {
    right: -32px;
}

@keyframes messageReveal {
    0% {
        opacity: 0;
        transform: translateY(25px);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes starAppear {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    60% {
        opacity: 1;
        transform: translateY(-50%) scale(1.3);
    }
    100% {
        opacity: 0.8;
        transform: translateY(-50%) scale(1);
    }
}

/* Card Footer */
.card-footer {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
    background: linear-gradient(180deg, 
        var(--white-soft) 0%, 
        rgba(255, 248, 252, 0.95) 100%
    );
    text-align: center;
    border-radius: 0 0 28px 28px;
}

.heart-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    opacity: 0;
    animation: heartAppear 0.8s var(--ease-elegant) 2.5s forwards;
}

.heart {
    font-size: 1.8rem;
    color: var(--pink-soft);
    transition: all var(--duration-medium) var(--ease-smooth);
    display: inline-block;
}

@keyframes heartAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.5);
    }
    60% {
        transform: translateY(-5px) scale(1.1);
    }
    100% {
        opacity: 0.85;
        transform: translateY(0) scale(1);
    }
}

.heart-link:hover .heart {
    color: var(--pink-accent);
    transform: scale(1.4);
    filter: drop-shadow(0 6px 16px rgba(233, 30, 99, 0.5));
    animation: heartBounce 0.6s ease;
}

.heart-link:active .heart {
    transform: scale(1.6);
}

@keyframes heartBounce {
    0%, 100% { transform: scale(1.4); }
    50% { transform: scale(1.6); }
}

.heart-link:focus-visible {
    outline: 2px solid var(--pink-accent);
    outline-offset: 4px;
    border-radius: 24px;
}

/* Back Link */
.back-link {
    gap: var(--space-sm);
}

.back-link .heart {
    font-size: 1.5rem;
}

.back-text {
    font-family: 'Cormorant', serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    transition: color var(--duration-medium) var(--ease-smooth);
}

.back-link:hover .back-text {
    color: var(--pink-accent);
}

/* About Page Styles */
.about-card {
    max-width: 560px;
}

.about-body {
    padding: var(--space-xl) var(--space-xl) var(--space-xxl);
}

.about-section {
    margin-bottom: var(--space-xxl);
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-heading {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 600;
    color: var(--pink-accent);
    margin-bottom: var(--space-md);
    text-align: center;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInUp 1.2s var(--ease-elegant) 0.4s forwards;
}

.about-text {
    font-family: 'Cormorant', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    opacity: 0;
    animation: fadeInUp 1.4s var(--ease-elegant) 0.6s forwards;
}

.about-text em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.about-text.closing {
    margin-top: var(--space-lg);
    animation-delay: 2s;
}

/* FAQ Items */
.faq-item {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(240, 178, 209, 0.2);
    opacity: 0;
    animation: fadeInUp 1s var(--ease-elegant) forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.8s; }
.faq-item:nth-child(2) { animation-delay: 1s; }
.faq-item:nth-child(3) { animation-delay: 1.2s; }
.faq-item:nth-child(4) { animation-delay: 1.4s; }

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-question {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.6;
    position: relative;
    padding-left: var(--space-sm);
}

.faq-question::before {
    content: '✧';
    position: absolute;
    left: 0;
    color: var(--pink-soft);
    font-size: 0.9rem;
    opacity: 0.7;
}

.faq-answer {
    font-family: 'Cormorant', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    padding-left: var(--space-sm);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Design */
@media (max-width: 520px) {
    :root {
        --space-xl: 40px;
        --space-xxl: 48px;
    }
    
    .card {
        border-radius: 24px;
    }
    
    .card-header {
        padding: var(--space-lg) var(--space-md) var(--space-md);
    }
    
    .card-body {
        padding: var(--space-xl) var(--space-md);
    }
    
    .about-body {
        padding: var(--space-lg) var(--space-md) var(--space-xl);
    }
    
    .about-section {
        margin-bottom: var(--space-xl);
    }
    
    .faq-item {
        margin-bottom: var(--space-md);
        padding-bottom: var(--space-md);
    }
    
    .card-footer {
        padding: var(--space-md) var(--space-md) var(--space-lg);
        border-radius: 0 0 24px 24px;
    }
    
    .message-line {
        letter-spacing: 1px;
    }
    
    .message-main::before,
    .message-main::after {
        display: none;
    }
    
    .heart {
        font-size: 1.5rem;
    }
}

@media (max-width: 380px) {
    body {
        padding: var(--space-sm);
    }
    
    .card {
        border-radius: 20px;
    }
    
    .card-body {
        padding: var(--space-lg) var(--space-md);
    }
    
    .message {
        gap: var(--space-sm);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, 
            #2a1a2a 0%, 
            #3d2836 40%, 
            #4a2f42 100%
        );
    }
    
    .card {
        background: rgba(40, 30, 38, 0.95);
        box-shadow: 
            0 30px 90px rgba(0, 0, 0, 0.4),
            0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .card-header,
    .card-body {
        background: linear-gradient(180deg, 
            rgba(45, 35, 43, 0.9) 0%, 
            rgba(40, 30, 38, 0.95) 100%
        );
    }
    
    .card-footer {
        background: linear-gradient(180deg, 
            rgba(40, 30, 38, 0.95) 0%, 
            rgba(35, 25, 33, 0.9) 100%
        );
    }
    
    .site-title {
        color: var(--pink-soft);
    }
    
    .message-line {
        color: var(--text-tertiary);
    }
    
    .message-main {
        color: var(--pink-soft);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .ambient-glow,
    body::before,
    body::after {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .sparkles,
    .hearts {
        display: none;
    }
}
