/* ========================================
   HERO SECTION & FEATURE CARDS STYLES
   Modern, gradient-based hero with animated backgrounds
   ======================================== */

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 20px;
}

[data-theme="light"] .hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

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

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text, #f1f5f9);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    animation: slideIn 0.8s ease 0.2s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Hero Title */
.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
    display: inline-block;
}

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

.hero-emoji {
    display: inline-block;
    font-size: 0.8em;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Hero Subtitle */
.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.6;
    color: var(--text-secondary, #94a3b8);
    max-width: 700px;
    margin: 0 auto 48px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

[data-theme="light"] .hero-subtitle {
    color: #475569;
}

.hero-subtitle strong {
    color: var(--text, #f1f5f9);
    font-weight: 700;
}

[data-theme="light"] .hero-subtitle strong {
    color: #1e293b;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-divider {
    color: rgba(148, 163, 184, 0.3);
    font-size: 1.5rem;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
    padding: 8px 16px;
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.badge svg {
    width: 16px;
    height: 16px;
    color: #667eea;
}

/* Scroll Hint */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.6;
    animation: fadeInUp 0.8s ease 0.7s both;
}

.scroll-hint svg {
    animation: bounceArrow 2s ease-in-out infinite;
}

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

/* Animated Background Orbs */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

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

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #667eea 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #764ba2 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #f093fb 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 50px) scale(0.9);
    }
}

/* ===== Features Section ===== */
.features-section {
    padding: 80px 20px;
    background: var(--bg, #0f172a);
    position: relative;
}

[data-theme="light"] .features-section {
    background: #ffffff;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

@media (max-width: 1200px) {
    .features-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    padding: 40px 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease both;
}

.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; }

[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:nth-child(1)::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.feature-card:nth-child(2)::before {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}

.feature-card:nth-child(3)::before {
    background: linear-gradient(90deg, #43e97b, #38f9d7);
}

.feature-card:nth-child(4)::before {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

/* Feature Icons */
.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.gradient-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.3);
}

.gradient-green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 8px 24px rgba(67, 233, 123, 0.3);
}

.gradient-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 24px rgba(240, 147, 251, 0.3);
}

.feature-icon svg {
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text, #f1f5f9);
    margin: 0 0 12px 0;
}

[data-theme="light"] .feature-card h3 {
    color: #1e293b;
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 24px 0;
}

[data-theme="light"] .feature-card p {
    color: #475569;
}

.feature-card p strong {
    color: var(--text, #f1f5f9);
    font-weight: 600;
}

[data-theme="light"] .feature-card p strong {
    color: #1e293b;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    font-size: 0.9rem;
    color: var(--text-secondary, #94a3b8);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="light"] .feature-list li {
    color: #64748b;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 80px 20px 60px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .trust-badges {
        gap: 12px;
    }

    .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .features-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .features-section {
        padding: 60px 20px;
    }

    .gradient-orb {
        filter: blur(60px);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

    .trust-badges {
        flex-direction: column;
        gap: 8px;
    }

    .badge {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Analytics Modal ===== */
.analytics-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg, #1e293b);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .modal-content {
    background: white;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text, #f1f5f9);
}

[data-theme="light"] .modal-header h2 {
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary, #94a3b8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.modal-body {
    padding: 32px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(148, 163, 184, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.analytics-link-info {
    background: rgba(100, 116, 139, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.analytics-link-info h3 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: var(--text, #f1f5f9);
}

.analytics-link-info p {
    margin: 8px 0;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.95rem;
}

.analytics-link-info a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.analytics-link-info a:hover {
    color: #f093fb;
    text-decoration: underline;
}

.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 1024px) {
    .analytics-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-box .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-box .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.analytics-section {
    margin-bottom: 32px;
}

.analytics-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    color: var(--text, #f1f5f9);
}

.analytics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-item {
    display: grid;
    grid-template-columns: 150px 1fr 60px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(100, 116, 139, 0.05);
    border-radius: 8px;
}

.item-label {
    font-weight: 500;
    color: var(--text, #f1f5f9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-bar {
    height: 8px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.item-value {
    text-align: right;
    font-weight: 700;
    color: #667eea;
}

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

/* ===== Mobile Responsive for Modal ===== */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        margin: 10px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .analytics-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .analytics-item {
        grid-template-columns: 100px 1fr 50px;
        font-size: 0.9rem;
    }
}
