/**
 * Tarqeyah Platform - Ultra Modern Design
 * iOS-Inspired Glassmorphism & Fluid Design
 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background: linear-gradient(180deg, #f6f5f2 0%, #ffffff 50%, #f6f5f2 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: 100px; /* Space for floating header */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* ===== Container ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Floating Glassmorphism Header ===== */
.main-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-sticky);
    width: calc(100% - 48px);
    max-width: 1200px;

    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.08),
            0 1px 4px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);

    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.main-header.scrolled {
    top: 8px;
    width: calc(100% - 32px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
            0 12px 48px rgba(0, 0, 0, 0.12),
            0 2px 8px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: var(--spacing-lg);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
    transform: scale(1.05);
}

.logo svg {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(77, 97, 244, 0.2));
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 4px;
    background: rgba(246, 245, 242, 0.5);
    border-radius: 16px;
}

.nav-menu a {
    position: relative;
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.nav-menu a:hover::before,
.nav-menu .active a::before {
    opacity: 1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-menu a:hover,
.nav-menu .active a {
    color: var(--primary-color);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Cart Icon */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    background: rgba(246, 245, 242, 0.5);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-icon:hover {
    background: var(--white);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    background: linear-gradient(135deg, #4d61f4, #cb89ff);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(77, 97, 244, 0.4);
}

/* Buttons - iOS Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-login {
    color: var(--primary-color);
    background: rgba(77, 97, 244, 0.08);
}

.btn-login:hover {
    background: rgba(77, 97, 244, 0.15);
    transform: translateY(-2px);
}

.btn-signup {
    color: var(--white);
    background: linear-gradient(135deg, #4d61f4, #cb89ff);
    box-shadow:
            0 4px 16px rgba(77, 97, 244, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-signup:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
            0 8px 24px rgba(77, 97, 244, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, #4d61f4, #cb89ff);
    box-shadow:
            0 8px 32px rgba(77, 97, 244, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
            0 12px 48px rgba(77, 97, 244, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-white {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-white:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
    border-radius: 16px;
}

/* User Menu */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(246, 245, 242, 0.5);
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-menu-btn:hover {
    background: var(--white);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    background: linear-gradient(135deg, #4d61f4, #cb89ff);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(77, 97, 244, 0.3);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 8px;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.15),
            0 4px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: var(--z-dropdown);
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    border-radius: 12px;
    transition: all 0.2s;
}

.user-dropdown a:hover {
    background: rgba(77, 97, 244, 0.08);
    color: var(--primary-color);
}

.user-dropdown hr {
    margin: 8px 0;
    border: 0;
    height: 1px;
    background: var(--border-color);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
}

.mobile-nav {
    display: none;
}

/* ===== Main Content ===== */
.main-content {
    min-height: 100vh;
}

/* ===== Hero Section - Ultra Modern ===== */
.hero-section {
    position: relative;
    padding: 100px 0 120px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(77, 97, 244, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(203, 137, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(77, 97, 244, 0.2);
    border-radius: 24px;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    box-shadow:
            0 4px 16px rgba(77, 97, 244, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: badgeFloat 3s ease-in-out infinite;
}

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

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: clamp(18px, 3vw, 22px);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 80px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-stat {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-stat:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
            0 16px 48px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-stat-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* ===== Glass Cards ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    padding: 40px;
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ===== Features Section ===== */
.features-section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(77, 97, 244, 0.2);
    border-radius: 24px;
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow:
            0 4px 16px rgba(77, 97, 244, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.section-title {
    font-size: clamp(36px, 6vw, 56px);
    margin-bottom: 16px;
}

.section-description {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow:
            0 24px 72px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #4d61f4, #cb89ff);
    border-radius: 20px;
    color: var(--white);
    box-shadow:
            0 8px 32px rgba(77, 97, 244, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
}

/* ===== Stats Section with Gradient ===== */
.stats-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #4d61f4 0%, #cb89ff 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin: 100px 24px;
    border-radius: 48px;
    box-shadow: 0 32px 96px rgba(77, 97, 244, 0.3);
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.stats-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    text-align: center;
}

.stat-number {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
    font-weight: var(--font-weight-medium);
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 100px 0;
}

.cta-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 60px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 48px;
    text-align: center;
    box-shadow:
            0 32px 96px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(77, 97, 244, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

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

.cta-title {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 20px;
}

.cta-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ===== Footer ===== */
.main-footer {
    background: var(--bg-dark);
    color: var(--gray-400);
    padding: 80px 0 40px;
    margin-top: 100px;
    border-radius: 48px 48px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.footer-section h3 {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--gray-400);
    font-size: 15px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--gray-400);
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--primary-gradient);
    color: var(--white);
    transform: translateY(-4px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

/* ===== Testimonials ===== */
.testimonial-rating {
    font-size: 20px;
    margin-bottom: 16px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 24px 0;
}

/* ===== Flash Messages ===== */
.flash-message {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 400px;
    padding: 20px 28px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: var(--z-modal);
    animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-left: 4px solid;
    font-weight: 500;
}

.flash-success { border-left-color: #0b3e27; color: #0b3e27; }
.flash-error { border-left-color: #ef4444; color: #ef4444; }
.flash-warning { border-left-color: #f59e0b; color: #f59e0b; }
.flash-info { border-left-color: #4d61f4; color: #4d61f4; }

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== Ripple Effect ===== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== Pull to Refresh Indicator ===== */
.pull-to-refresh {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    transition: transform 0.3s;
    z-index: var(--z-tooltip);
}

.pull-to-refresh.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== How It Works Section - Timeline Style ===== */
.how-it-works-section {
    padding: 120px 0;
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f6f5f2 100%);
}

.steps-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* Timeline Line */
.steps-container::before {
    content: '';
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: calc(100% - 200px);
    background: linear-gradient(180deg,
    rgba(77, 97, 244, 0.2) 0%,
    rgba(203, 137, 255, 0.4) 50%,
    rgba(77, 97, 244, 0.2) 100%
    );
    border-radius: 10px;
}

/* Individual Step */
.step-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-bottom: 120px;
    position: relative;
    align-items: center;
}

.step-item:last-child {
    margin-bottom: 0;
}

/* Alternate layout for even items */
.step-item:nth-child(even) .step-content {
    order: 2;
}

.step-item:nth-child(even) .step-visual {
    order: 1;
}

/* Step Number Badge */
.step-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);

    border: 4px solid transparent;
    border-radius: 50%;

    background-image:
            linear-gradient(white, white),
            linear-gradient(135deg, #4d61f4, #cb89ff);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);

    box-shadow:
            0 12px 40px rgba(77, 97, 244, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);

    z-index: 2;

    animation: float 3s ease-in-out infinite;
}

.step-item:nth-child(1) .step-number {
    animation-delay: 0s;
}

.step-item:nth-child(2) .step-number {
    animation-delay: 0.5s;
}

.step-item:nth-child(3) .step-number {
    animation-delay: 1s;
}

/* Step Content */
.step-content {
    padding: 40px;
    position: relative;
}

.step-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);

    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Step Visual Card */
.step-visual {
    padding: 60px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);

    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
    rgba(77, 97, 244, 0.03) 0%,
    rgba(203, 137, 255, 0.03) 100%
    );
    opacity: 0;
    transition: opacity 0.5s;
}

.step-visual:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
            0 32px 80px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.step-visual:hover::before {
    opacity: 1;
}

/* Large Icon in Visual */
.step-icon-large {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #4d61f4 0%, #cb89ff 100%);
    border-radius: 28px;

    color: var(--white);

    box-shadow:
            0 16px 48px rgba(77, 97, 244, 0.35),
            inset 0 2px 0 rgba(255, 255, 255, 0.25);

    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-visual:hover .step-icon-large {
    transform: scale(1.1) rotate(5deg);
    box-shadow:
            0 24px 64px rgba(77, 97, 244, 0.45),
            inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.step-icon-large svg {
    width: 72px;
    height: 72px;
}

/* Decorative Elements */
.step-item::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.step-item:nth-child(1)::after {
    top: -50px;
    right: -50px;
    background: radial-gradient(circle, rgba(77, 97, 244, 0.06) 0%, transparent 70%);
}

.step-item:nth-child(2)::after {
    bottom: -50px;
    left: -50px;
    background: radial-gradient(circle, rgba(203, 137, 255, 0.06) 0%, transparent 70%);
}

.step-item:nth-child(3)::after {
    top: -50px;
    left: -50px;
    background: radial-gradient(circle, rgba(215, 254, 124, 0.1) 0%, transparent 70%);
}

/* Entrance Animation */
.step-item {
    opacity: 0;
    transform: translateY(40px);
    animation: stepFadeIn 0.8s ease-out forwards;
}

.step-item:nth-child(1) {
    animation-delay: 0.2s;
}

.step-item:nth-child(2) {
    animation-delay: 0.4s;
}

.step-item:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes stepFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Tablet & Mobile Responsive ===== */
@media (max-width: 1024px) {
    .how-it-works-section {
        padding: 80px 0;
    }

    .steps-container {
        max-width: 800px;
    }

    .step-item {
        gap: 60px;
        margin-bottom: 100px;
    }

    .step-number {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .step-title {
        font-size: 28px;
    }

    .step-description {
        font-size: 17px;
    }

    .step-visual {
        padding: 50px;
    }

    .step-icon-large {
        width: 120px;
        height: 120px;
    }

    .step-icon-large svg {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .how-it-works-section {
        padding: 60px 0;
    }

    /* Stack vertically on mobile */
    .step-item {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 80px;
        padding: 0 20px;
    }

    .step-item:nth-child(even) .step-content,
    .step-item:nth-child(even) .step-visual {
        order: unset;
    }

    /* Remove timeline line on mobile */
    .steps-container::before {
        display: none;
    }

    /* Reposition step number */
    .step-number {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin: 0 auto 32px;
    }

    .step-content {
        padding: 0;
        text-align: center;
    }

    .step-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .step-description {
        font-size: 16px;
    }

    .step-visual {
        padding: 40px 32px;
        border-radius: 24px;
    }

    .step-icon-large {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }

    .step-icon-large svg {
        width: 52px;
        height: 52px;
    }

    .step-item::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .step-item {
        margin-bottom: 60px;
    }

    .step-number {
        width: 56px;
        height: 56px;
        font-size: 22px;
        margin-bottom: 24px;
    }

    .step-title {
        font-size: 22px;
    }

    .step-description {
        font-size: 15px;
    }

    .step-visual {
        padding: 32px 24px;
    }

    .step-icon-large {
        width: 88px;
        height: 88px;
    }

    .step-icon-large svg {
        width: 44px;
        height: 44px;
    }
}

/* Animated Timeline Line */
.steps-container::after {
    content: '';
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg,
    #4d61f4 0%,
    #cb89ff 50%,
    #4d61f4 100%
    );
    border-radius: 10px;
    transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.steps-container.animated::after {
    height: calc(100% - 200px);
}