:root {
    --bg-dark: #050505;
    --bg-gradient-1: #4c1d95;
    /* Deep Purple */
    --bg-gradient-2: #0891b2;
    /* Cyan */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-color: #007aff;
    --accent-glow: rgba(0, 122, 255, 0.5);
    --danger-color: #ff3b30;
    --success-color: #34c759;
}

html {
    background-color: var(--bg-dark);
    /* background-image: radial-gradient(circle at 50% 0%, #1a1a2e 0%, var(--bg-dark) 80%); */
    height: 100%;
    overscroll-behavior-y: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    min-height: 100%;
    background-color: transparent;
    position: relative;
}

/* Dynamic Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--bg-gradient-1);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--bg-gradient-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--danger-color);
    top: 40%;
    left: 30%;
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Typography */
h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
}

p.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Sections */
section {
    padding: 100px 0;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    /* Reduced from 100vh to show content sooner */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-badge {
    padding: 8px 16px;
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: fadeInDown 0.8s ease-out;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-color);
    color: white;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 20px var(--accent-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    background: #0063ce;
}

.btn-primary svg {
    width: 24px;
    height: 24px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s ease, background 0.3s ease;
    opacity: 0;
    /* JS will trigger fade in */
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: var(--glass-highlight);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 28px;
    color: var(--accent-color);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Animations Demo Section */
.animation-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    /* Increased height for the grid */
}

.heart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.chat-bubble-dark {
    /* Removed old styles, using telegram-message mostly */
    background: transparent;
    padding: 0;
    border: none;
    backdrop-filter: none;
}

.telegram-message {
    background-color: #2b5278;
    /* Classic Telegram Dark Blue/Grey */
    padding: 8px 12px;
    border-radius: 14px 14px 0 14px;
    display: inline-flex;
    align-items: flex-end;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: none;
    max-width: 300px;
    position: relative;
    /* Ensure it looks centered or positioned correctly in container */
}

.heart-action {
    font-size: 1rem;
    color: white;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.message-meta-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    user-select: none;
}

.message-time {
    font-size: 11px;
    color: #8da2b5;
}

.message-checks {
    font-size: 10px;
    color: #64b5f6;
    /* Read receipt blue */
}

.heart-stage {
    font-family: 'Courier New', monospace;
    white-space: pre;
    line-height: 1.1;
    font-size: 1.2rem;
    /* Adjust based on screen size */
    text-align: center;
    color: #ff3b30;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.heart-icon {
    font-size: 6rem;
    filter: drop-shadow(0 10px 20px rgba(255, 0, 0, 0.3));
    /* Use a gradient text if possible, or just emoji red */
    background: linear-gradient(135deg, #ff3b30 0%, #ff9f0a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Fallback for emoji if gradient doesn't work well on emoji */
@supports (-webkit-background-clip: text) {
    .heart-icon {
        background: none;
        -webkit-text-fill-color: initial;
        color: #ff3b30;
        text-shadow: 0 0 30px rgba(255, 59, 48, 0.4);
    }
}

.heart-text-wrapper {
    height: 40px;
    /* Fixed height to prevent layout shift */
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pulse {
    animation: heartPulse 1.2s infinite ease-in-out;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.3);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding-top: 60px;
        min-height: auto;
        padding-bottom: 60px;
    }
}