:root {
    --primary: #00f2ff;
    --primary-dark: #00d1ff;
    --bg: #030712;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f9fafb;
    --text-dim: #9ca3af;
    --success: #10b981;
    --accent: #8b5cf6;
}

/* Light Theme */
[data-theme="light"] {
    --bg: #f8fafc;
    --card-bg: rgba(0, 0, 0, 0.03);
    --border: rgba(0, 0, 0, 0.1);
    --text: #1e293b;
    --text-dim: #64748b;
}

[data-theme="light"] .glow-top,
[data-theme="light"] .glow-bottom {
    opacity: 0.3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.glow-top {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.15) 0%, transparent 70%);
    filter: blur(80px);
}

.glow-bottom {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    filter: blur(80px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.3s;
}

.theme-toggle:hover {
    border-color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

/* Navigation */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 100px;
    position: sticky;
    top: 1.5rem;
    z-index: 100;
}

[data-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.8);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo span span {
    color: var(--primary);
}

.zap-icon {
    color: var(--primary);
    fill: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-premium {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600 !important;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.dropdown:hover .dropdown-toggle,
.dropdown.active .dropdown-toggle {
    color: var(--primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.8rem;
    min-width: 220px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
}

.dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem !important;
    color: var(--text-dim) !important;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(0, 242, 255, 0.08);
    color: var(--primary) !important;
}

.dropdown-menu i {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.dropdown-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255, 255, 255, 0.1) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-card {
    height: 120px;
    border-radius: 1.5rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Tooltips */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: help;
}

.tooltip-icon {
    width: 14px;
    height: 14px;
    color: var(--text-dim);
    opacity: 0.6;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text);
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
}

.gradient-text {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: background 0.3s, border 0.3s;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card .value.online {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-card .value.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

/* Trends Section */
.trends-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
}

.live-indicator {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.trend-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.trend-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.trend-rank {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    right: 1.5rem;
    top: 1rem;
}

[data-theme="light"] .trend-rank {
    color: rgba(0, 0, 0, 0.05);
}

.trend-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.traffic {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.intent {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.intent.commercial {
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary);
}

.btn-analyze {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.btn-analyze:hover {
    background: var(--primary);
    color: var(--bg);
    transform: rotate(15deg);
}

/* CTA Banner */
.cta-banner {
    margin-top: 4rem;
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(0, 242, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-content h3 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.cta-content p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
}

/* Form Elements */
input,
select,
textarea {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
}

option {
    background-color: var(--bg);
    color: var(--text);
}

[data-theme="light"] option {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* AI Modal & Premium Insights */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.ai-modal.active {
    display: flex;
}

.ai-modal-content {
    background: #0f172a;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 2rem;
    max-width: 650px;
    width: 100%;
    padding: 3rem;
    position: relative;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ai-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.2s;
}

.ai-modal-close:hover {
    color: white;
}

.ai-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.shimmer {
    width: 100%;
    height: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 10px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.ai-insight-text {
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--text);
}

.ai-insight-text b,
.ai-insight-text strong {
    color: var(--ml-gold);
}

.btn-favorite {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 50%;
}

.btn-favorite:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

[data-theme="light"] .btn-favorite:hover {
    background: rgba(0, 0, 0, 0.05);
}

footer {
    padding: 4rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Animations */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error Message */
.error-msg {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-dim);
    justify-content: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 99;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2rem;
    }

    .cta-content h3 {
        font-size: 1.5rem;
    }

    .trends-grid {
        grid-template-columns: 1fr;
    }

    .glass-nav {
        margin: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .hero {
        padding: 4rem 0 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .gradient-text {
        font-size: 2rem;
    }

    .btn-primary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .trends-grid {
        grid-template-columns: 1fr;
    }

    .trend-content h3 {
        font-size: 1rem;
        max-width: 180px;
    }
}