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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #0f0f23;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glow-color: rgba(102, 126, 234, 0.5);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== Animated Background ===== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float-orb 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-gradient);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(0, 50px) scale(0.95);
    }
    75% {
        transform: translate(-50px, -25px) scale(1.05);
    }
}

/* ===== Main Container ===== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

/* ===== Glass Card ===== */
.card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(102, 126, 234, 0.1);
    overflow: hidden;
    animation: card-entrance 1s ease-out;
}

@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(102, 126, 234, 0.1) 60deg,
        transparent 120deg,
        rgba(245, 87, 108, 0.1) 180deg,
        transparent 240deg,
        rgba(79, 172, 254, 0.1) 300deg,
        transparent 360deg
    );
    animation: rotate-glow 10s linear infinite;
    pointer-events: none;
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.card-content {
    position: relative;
    z-index: 1;
}

/* ===== Animated Title ===== */
.title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-letter {
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, #a8b2d1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letter-bounce 2s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.title-letter:nth-child(1) { --i: 1; }
.title-letter:nth-child(2) { --i: 2; }
.title-letter:nth-child(3) { --i: 3; }
.title-letter:nth-child(4) { --i: 4; }
.title-letter:nth-child(5) { --i: 5; }
.title-letter:nth-child(6) { --i: 6; }
.title-letter:nth-child(7) { --i: 7; }
.title-letter:nth-child(8) { --i: 8; }
.title-letter:nth-child(9) { --i: 9; }
.title-letter:nth-child(10) { --i: 10; }
.title-letter:nth-child(11) { --i: 11; }
.title-letter:nth-child(12) { --i: 12; }

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

.space {
    width: 0.3em;
}

/* ===== Subtitle & Description ===== */
.subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    animation: fade-in-up 1s ease-out 0.3s both;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
    animation: expand-width 1s ease-out 0.5s both;
}

@keyframes expand-width {
    0% {
        width: 0;
    }
    100% {
        width: 60px;
    }
}

.description {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fade-in-up 1s ease-out 0.7s both;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CTA Button ===== */
.cta-button {
    position: relative;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: fade-in-up 1s ease-out 0.9s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.cta-button:active {
    transform: translateY(-1px);
}

.cta-button.active {
    background: var(--secondary-gradient);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.cta-button:hover .button-shine {
    left: 100%;
}

/* ===== Floating Shapes ===== */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float-shape 15s ease-in-out infinite;
}

.shape-1 {
    width: 40px;
    height: 40px;
    border: 2px solid #667eea;
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    border: 2px solid #f5576c;
    transform: rotate(45deg);
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.shape-3 {
    width: 30px;
    height: 30px;
    background: #4facfe;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 30%;
    right: 20%;
    animation-delay: -6s;
}

.shape-4 {
    width: 50px;
    height: 50px;
    border: 2px solid #f093fb;
    border-radius: 10px;
    bottom: 20%;
    left: 15%;
    animation-delay: -9s;
}

.shape-5 {
    width: 20px;
    height: 20px;
    background: #00f2fe;
    border-radius: 50%;
    top: 70%;
    left: 30%;
    animation-delay: -12s;
}

@keyframes float-shape {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
        opacity: 0.2;
    }
    50% {
        transform: translate(0, 30px) rotate(180deg);
        opacity: 0.1;
    }
    75% {
        transform: translate(-30px, -15px) rotate(270deg);
        opacity: 0.15;
    }
}

/* ===== Footer ===== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: fade-in-up 1s ease-out 1.1s both;
}

.heart {
    color: #f5576c;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10% {
        transform: scale(1.2);
    }
    20% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.2);
    }
    40% {
        transform: scale(1);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .gradient-orb {
        filter: blur(60px);
    }
    
    .orb-1 {
        width: 400px;
        height: 400px;
    }
    
    .orb-2 {
        width: 350px;
        height: 350px;
    }
    
    .orb-3 {
        width: 300px;
        height: 300px;
    }
    
    .shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem 1rem;
    }
    
    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 1400px) {
    .card {
        max-width: 700px;
        padding: 4rem;
    }
}

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

/* ===== Dark/Light Mode Support ===== */
@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #f5f7fa;
        --card-bg: rgba(255, 255, 255, 0.8);
        --text-primary: #1a1a2e;
        --text-secondary: rgba(26, 26, 46, 0.7);
    }
    
    .card {
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.15),
            0 0 100px rgba(102, 126, 234, 0.1);
    }
}
