/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    /* Light Theme Colors */
    --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%);
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode specific overrides */
:root[data-theme="light"] .screenshot-slider,
:root:not([data-theme="dark"]) .screenshot-slider {
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1a1a1a;

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;

    --border-color: #27272a;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Dark mode specific overrides */
[data-theme="dark"] .screenshot-slider {
    border: 1px solid #3f3f46;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: radial-gradient(var(--text-tertiary) 0.5px, transparent 0.5px);
    background-size: 15px 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Safari Compatibility Fixes */
@supports (-webkit-appearance: none) {
    .screenshot-slider,
    .slide,
    .slider-container {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .navbar {
    background-color: rgba(10, 10, 10, 0.8);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}

.logo-image {
    height: 40px;
    width: auto;
}

/* Logo visibility based on theme */
/* Light mode (default): show light logos, hide dark logos */
.logo-light {
    display: block;
}
.logo-dark {
    display: none;
}

/* Dark mode: show dark logos, hide light logos */
[data-theme="dark"] .logo-light {
    display: none;
}
[data-theme="dark"] .logo-dark {
    display: block;
}

/* Desktop/Mobile logo visibility */
/* Desktop: show desktop logos, hide mobile logos */
.logo-desktop {
    display: block;
}
.logo-mobile {
    display: none !important;
}

/* Combine theme and device visibility */
.logo-desktop.logo-dark {
    display: none;
}
[data-theme="dark"] .logo-desktop.logo-light {
    display: none;
}
[data-theme="dark"] .logo-desktop.logo-dark {
    display: block;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Highlighted Navigation Link */
.nav-highlight {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600 !important;
    position: relative;
    animation: pulse-glow 2s ease-in-out infinite;
}

.nav-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -10px;
    right: -10px;
    bottom: -4px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 8px;
    z-index: -1;
    animation: pulse-bg 2s ease-in-out infinite;
}

.nav-highlight::after {
    display: none !important;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes pulse-bg {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Mobile Highlighted Link */
.nav-highlight-mobile {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    color: #667eea !important;
    font-weight: 600 !important;
    border-left: 3px solid #667eea;
    animation: pulse-mobile 2s ease-in-out infinite;
}

@keyframes pulse-mobile {
    0%, 100% {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    }
    50% {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    }
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    transform: scale(1.05);
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: #1a1a2e;
    z-index: 9998;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0) !important;
}

.mobile-menu-content {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-link {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    display: block;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
    background-color: var(--bg-secondary);
    color: #667eea;
}

.mobile-menu-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-auth-btn {
    text-align: center;
    text-decoration: none;
}

.mobile-auth-btn.btn-primary {
    color: white !important;
    background: var(--primary-gradient);
}

.mobile-auth-btn.btn-primary:hover {
    color: white !important;
}

.theme-toggle.mobile {
    width: 100%;
    justify-content: center;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
}

.theme-toggle.mobile span {
    display: inline;
    margin-left: 8px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

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

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -200px;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -150px;
    right: -100px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-main-content {
    display: flex;
    gap: 60px; /* Adjust spacing between text and slider */
    align-items: center;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 50%; /* Take up half the space */
}

.hero-visual {
    flex: 1;
    max-width: 50%; /* Take up half the space */
}

.hero-cta {
    margin-bottom: 60px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

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

.stat-number {
    font-size: 32px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Dashboard Preview */
.hero-visual {
    position: relative;
}

.dashboard-preview {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.8s ease-out;
}

.preview-header {
    background: var(--bg-secondary);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.preview-dots {
    display: flex;
    gap: 8px;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
}

.preview-content {
    padding: 20px;
    position: relative;
    /* Safari fallback */
    padding-bottom: 75%; /* 4:3 aspect ratio (3/4 = 0.75) */
    height: 0;
}

/* Modern browsers with aspect-ratio support */
@supports (aspect-ratio: 4 / 3) {
    .preview-content {
        aspect-ratio: 4 / 3;
        padding-bottom: 0;
        height: auto;
    }
}

.screenshot-slider {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-secondary);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* For browsers with aspect-ratio support, use normal positioning */
@supports (aspect-ratio: 4 / 3) {
    .screenshot-slider {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg-secondary);
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    z-index: 10;
}

.slider-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: var(--transition);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    color: white !important;
}

.btn-primary svg {
    stroke: white !important;
}

.btn-primary a,
.btn-primary span {
    color: white !important;
}

.btn-primary.nav-btn,
.btn-secondary.nav-btn {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary.nav-btn {
    color: white !important;
}

.btn-primary.nav-btn:visited,
.btn-primary.nav-btn:active {
    color: white !important;
}

.btn-secondary.nav-btn {
    background: transparent;
    border: 1.5px solid var(--border-color);
}

.btn-secondary.nav-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

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

/* Sections */
section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
    animation: fadeIn 0.5s ease-in-out;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

/* Features Section */
.features {
    background: var(--bg-secondary);
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    transition: var(--transition);
    animation: fadeIn 0.5s ease-in-out;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: #667eea;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: white;
}

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

.feature-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 700;
}

/* Use Cases Section */
.use-cases {
    background: var(--bg-primary);
}

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

.use-case-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.use-case-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.3s ease;
}

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

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

.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
}

.analysis-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: #667eea;
}

.analysis-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.analysis-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.analysis-card .arrow-icon {
    position: absolute;
    right: 32px;
    bottom: 32px;
    font-size: 24px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.analysis-card:hover .arrow-icon {
    transform: translateX(5px);
}
.use-case-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.use-case-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    opacity: 0.5;
}

.use-case-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.use-case-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.use-case-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.benefit-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* Analytics Section */
.analytics {
    background: var(--bg-secondary);
}

.analytics-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.analytics-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.analytics-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.analytics-feature {
    display: flex;
    gap: 20px;
}

.analytics-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.analytics-feature h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.analytics-feature p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
}

.analytics-dashboard {
    display: grid;
    gap: 24px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.card-badge.high {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="dark"] .card-badge.high {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
}

.card-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.card-trend.up {
    background: #dcfce7;
    color: #16a34a;
}

[data-theme="dark"] .card-trend.up {
    background: rgba(22, 163, 74, 0.2);
    color: #86efac;
}

.card-metric {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.card-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
}

.chart-bar {
    flex: 1;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: var(--transition);
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.card-subchart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subchart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.subchart-item:last-child {
    border-bottom: none;
}

.subchart-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.subchart-value {
    font-weight: 700;
    font-size: 18px;
}

/* API Section */
.api-section {
    background: var(--bg-primary);
}

.api-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.code-window {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-window-header {
    background: #2d2d2d;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-dots {
    display: flex;
    gap: 8px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) {
    background: #ff5f56;
}

.code-dots span:nth-child(2) {
    background: #ffbd2e;
}

.code-dots span:nth-child(3) {
    background: #27c93f;
}

.code-title {
    color: #8e8e93;
    font-size: 13px;
}

.code-content {
    padding: 24px;
    overflow-x: auto;
}

.code-content pre {
    color: #d4d4d4;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-keyword {
    color: #c586c0;
}

.code-string {
    color: #ce9178;
}

.code-comment {
    color: #6a9955;
}

.code-variable {
    color: #9cdcfe;
}

.code-number {
    color: #b5cea8;
}

.api-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.api-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.api-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.api-feature svg {
    color: #667eea;
    flex-shrink: 0;
    margin-top: 2px;
}

.api-cta {
    display: flex;
    gap: 16px;
}

/* Pricing Section */
.pricing {
    background: var(--bg-secondary);
}

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

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border: 2px solid #667eea;
    box-shadow: var(--shadow-lg);
}

.pricing-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pricing-header {
    margin-bottom: 32px;
    text-align: center;
}

.pricing-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.pricing-price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}

.price-currency {
    font-size: 24px;
    font-weight: 600;
    margin-top: 8px;
}

.price-amount {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
}

.price-period {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 16px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-secondary);
}

.pricing-features svg {
    color: #667eea;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Contact Section */
.contact {
    background: var(--bg-primary);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    text-align: center;
}

.contact-cta-buttons {
    display: flex;
    gap: 16px;
    margin: 32px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.contact-item svg {
    color: #667eea;
}

.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 20px;
}
    margin-bottom: 16px;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 300px;
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive Design */
/* ========================================
   RESPONSIVE DESIGN
   Breakpoints:
   - Mobile: 320px - 480px
   - Mobile Large: 481px - 767px  
   - Tablet: 768px - 1024px
   - Desktop: 1025px+
   ======================================== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 64px;
    }
}

/* Large Tablet & Small Desktop (769px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    /* Navigation adjustments */
    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 14px;
    }

    .btn-primary.nav-btn,
    .btn-secondary.nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Hero section */
    .hero-content {
        flex-direction: column;
        gap: 48px;
        text-align: center;
    }

    .hero-main-content {
        flex-direction: column;
        gap: 48px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-visual {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 42px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Preview content */
    .preview-content {
        padding: 20px;
        padding-bottom: 75%;
        height: 0;
    }

    @supports (aspect-ratio: 4 / 3) {
        .preview-content {
            aspect-ratio: 4 / 3;
            padding-bottom: 0;
            height: auto;
        }
    }

    /* Analytics & API sections */
    .analytics-content,
    .api-content {
        grid-template-columns: 1fr !important;
        gap: 48px;
        display: flex !important;
        flex-direction: column !important;
    }

    .analytics-text,
    .api-text {
        order: 1;
    }

    .analytics-visual,
    .api-visual {
        order: 2;
        position: relative !important;
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
    }

    .analytics-dashboard {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px;
    }

    .dashboard-card {
        position: relative !important;
        width: 100% !important;
    }

    /* Contact section */
    .contact-content {
        text-align: center;
    }

    .contact-info {
        justify-content: center;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
        text-align: center;
    }

    /* Features grid - 2 columns on tablet */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Use cases - 2 columns */
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pricing - 2 columns */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card.featured {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Mobile Large & Small Tablets (481px - 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 24px;
    }
    
    /* Navigation */
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-actions {
        gap: 12px;
    }
    
    .nav-actions .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* Hide theme toggle text on mobile */
    #themeToggle span {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding: 120px 0 60px;
    }

    .hero-main-content {
        flex-direction: column !important;
        gap: 40px !important;
    }

    .hero-text {
        max-width: 100% !important;
        text-align: center;
    }

    .hero-visual {
        max-width: 100% !important;
        width: 100% !important;
    }

    .hero-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-cta .btn {
        width: 100%;
    }

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

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

    /* Preview Dashboard */
    .dashboard-preview {
        width: 100%;
        min-height: 350px;
    }

    .preview-header {
        display: none;
    }

    .preview-content {
        padding: 0;
        height: 350px;
        position: relative;
    }

    .screenshot-slider {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        min-height: unset;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 32px 24px;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
    }

    /* Use Cases */
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .use-case-card {
        padding: 32px 24px;
    }

    /* Analytics Section */
    .analytics-visual {
        height: 350px;
    }
    
    .analytics-features {
        gap: 24px;
    }
    
    .analytics-feature {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .analytics-feature-icon {
        margin: 0 auto;
    }

    /* API Section */
    .api-visual {
        height: 300px;
    }
    
    .api-features {
        gap: 16px;
    }
    
    .api-feature {
        font-size: 14px;
    }
    
    .api-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .api-cta .btn {
        width: 100%;
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
    
    .pricing-card.featured {
        grid-column: auto;
        max-width: 100%;
    }

    /* Contact Section */
    .contact-info {
        flex-direction: column;
        gap: 16px;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .contact-cta-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .contact-cta-buttons .btn {
        width: 100%;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    /* Navigation */
    .navbar {
        padding: 16px 0;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    /* Preview Dashboard */
    .preview-content {
        padding: 12px;
        padding-bottom: 75%;
        height: 0;
    }

    @supports (aspect-ratio: 4 / 3) {
        .preview-content {
            aspect-ratio: 4 / 3;
            padding-bottom: 0;
            height: auto;
        }
    }

    .screenshot-slider {
        min-height: 250px;
    }
    
    .slider-controls {
        display: none; /* Hide arrow controls on very small screens */
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 15px;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
    }
    
    .feature-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .feature-title {
        font-size: 18px;
    }
    
    .feature-description {
        font-size: 14px;
    }
    
    .feature-list li {
        font-size: 13px;
    }
    
    /* Use Cases */
    .use-case-number {
        font-size: 40px;
    }
    
    .use-case-title {
        font-size: 18px;
    }
    
    .use-case-description {
        font-size: 14px;
    }
    
    .benefit-tag {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    /* Analytics */
    .analytics-visual,
    .api-visual {
        height: 300px;
    }
    
    .analytics-feature h4 {
        font-size: 16px;
    }
    
    .analytics-feature p {
        font-size: 13px;
    }
    
    /* Pricing */
    .pricing-card {
        padding: 24px 20px;
    }
    
    .pricing-badge {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .pricing-title {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 40px;
    }
    
    .pricing-features li {
        font-size: 13px;
    }
    
    /* Contact */
    .contact-text h2 {
        font-size: 24px;
    }
    
    .contact-description {
        font-size: 14px;
    }
    
    .contact-item {
        font-size: 14px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 24px;
    }
    
    .footer-title {
        font-size: 16px;
    }
    
    .footer-links a,
    .footer-description {
        font-size: 13px;
    }
    
    .footer-bottom {
        padding-top: 24px;
        font-size: 13px;
    }
}

/* Landscape Phone (landscape orientation) */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .preview-content {
        height: 300px;
    }
    
    .screenshot-slider {
        min-height: 200px;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-toggle,
    #themeToggle,
    .btn,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .feature-icon,
    svg {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

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

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0a0a0a;
        --bg-secondary: #111111;
        --bg-tertiary: #1a1a1a;
        --bg-card: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #a1a1aa;
        --text-tertiary: #71717a;
        --border-color: #27272a;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

/* Focus Visible (Accessibility) */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: none;
}

/* Analysis Page Styles */
.pricing-hero {
    padding: 140px 0 32px;
    background: var(--bg-primary);
    text-align: center;
}

.pricing-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.pricing-hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.analysis-filters {
    padding: 24px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.country-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.country-tab {
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.country-tab:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.country-tab.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.articles-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.article-country {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    font-size: 13px;
    color: var(--text-tertiary);
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #667eea;
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.article-author {
    font-size: 14px;
    color: var(--text-tertiary);
    font-style: italic;
}

.article-read-more {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.article-read-more:hover {
    color: #764ba2;
    transform: translateX(4px);
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state svg {
    color: var(--text-tertiary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
}

/* Responsive for Analysis Page */
@media (max-width: 767px) {
    .pricing-hero {
        padding: 120px 0 24px;
    }

    .pricing-hero-title {
        font-size: 32px;
    }

    .pricing-hero-subtitle {
        font-size: 16px;
    }

    .analysis-filters {
        padding: 20px 0;
    }

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

    .country-tabs {
        gap: 8px;
    }

    .country-tab {
        padding: 10px 16px;
        font-size: 14px;
    }

    .article-card {
        margin-bottom: 0;
    }
}

/* Article Detail Page Styles */
.article-loading,
.article-error {
    padding: 120px 0;
    min-height: 60vh;
}

.article-page {
    padding-top: 80px;
}

.article-header {
    padding: 60px 0 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.article-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
    color: var(--primary-color);
}

.article-breadcrumb span {
    color: var(--text-tertiary);
}

.article-meta-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.article-heading {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.article-author-info {
    font-size: 16px;
    color: var(--text-secondary);
}

.article-featured-image {
    padding: 0;
    background: var(--bg-primary);
}

.article-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 0;
}

.article-body {
    padding: 80px 0;
    background: var(--bg-primary);
}

.article-content-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content-body h1,
.article-content-body h2,
.article-content-body h3,
.article-content-body h4 {
    margin-top: 2em;
    margin-bottom: 0.75em;
    font-weight: 700;
    line-height: 1.3;
}

.article-content-body h1 { font-size: 36px; }
.article-content-body h2 { font-size: 28px; }
.article-content-body h3 { font-size: 22px; }
.article-content-body h4 { font-size: 18px; }

.article-content-body p {
    margin-bottom: 1.5em;
}

.article-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
}

.article-content-body ul,
.article-content-body ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.article-content-body li {
    margin-bottom: 0.5em;
}

.article-content-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content-body code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content-body pre {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.article-content-body pre code {
    background: none;
    padding: 0;
}

.article-content-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-content-body a:hover {
    color: #764ba2;
}

.article-back {
    padding: 40px 0 80px;
    background: var(--bg-primary);
    text-align: center;
}

/* Responsive for Article Page */
@media (max-width: 767px) {
    .article-heading {
        font-size: 32px;
    }

    .article-content-body {
        font-size: 16px;
    }

    .article-content-body h1 { font-size: 28px; }
    .article-content-body h2 { font-size: 24px; }
    .article-content-body h3 { font-size: 20px; }
    .article-content-body h4 { font-size: 16px; }

    .article-featured-image img {
        max-height: 300px;
    }
}

/* Chatbox styles */
.chatbox-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    max-height: 80vh; /* Add max-height */
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden; /* Ensure content inside doesn't spill out */
}

.chatbox-container.active {
    display: flex;
}

.chatbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chatbox-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chatbox-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.chatbox-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    /* Removed fixed height: 300px */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbox-message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.4;
}

.chatbox-message.user {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbox-message.assistant {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbox-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.chatbox-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.chatbox-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chatbox-input button {
    margin-left: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.chatbox-open {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: transform 0.2s;
}

.chatbox-open:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   COMPREHENSIVE RESPONSIVE FIXES
   ======================================== */

/* Tablet Improvements (max-width: 900px) */
@media (max-width: 900px) {
    /* Fix hero buttons wrapping */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn-large {
        width: 100%;
        justify-content: center;
    }

    /* Fix slider controls on smaller screens */
    .slider-controls {
        padding: 10px 16px;
    }

    .slider-btn {
        width: 28px;
        height: 28px;
    }
}

/* Mobile and Small Tablet Fixes (max-width: 768px) */
@media (max-width: 768px) {
    /* Ensure container has proper padding */
    .container {
        padding: 0 20px !important;
    }

    /* Fix navbar */
    .nav-content {
        height: 70px;
    }

    /* Mobile: show mobile logos, hide desktop logos */
    .logo-desktop {
        display: none !important;
    }
    .logo-mobile {
        display: block !important;
    }
    .logo-mobile.logo-dark {
        display: none !important;
    }
    [data-theme="dark"] .logo-mobile.logo-light {
        display: none !important;
    }
    [data-theme="dark"] .logo-mobile.logo-dark {
        display: block !important;
    }

    /* Fix hero section */
    .hero {
        padding: 120px 0 60px !important;
    }

    .hero-main-content {
        flex-direction: column !important;
        gap: 40px !important;
    }

    .hero-text {
        max-width: 100% !important;
        text-align: center;
    }

    .hero-visual {
        max-width: 100% !important;
        width: 100% !important;
    }

    .hero-title {
        font-size: 32px !important;
    }

    .hero-subtitle {
        font-size: 16px !important;
    }

    /* Ensure buttons stack properly */
    .hero-buttons {
        flex-direction: column !important;
        width: 100%;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Fix stats layout */
    .hero-stats {
        flex-direction: column !important;
        gap: 20px;
        width: 100%;
    }

    .stat-item {
        width: 100%;
        text-align: center !important;
    }

    /* Fix preview/slider */
    .dashboard-preview {
        max-width: 100%;
        min-height: 400px;
    }

    .preview-header {
        display: none; /* Hide dots on mobile to save space */
    }

    .preview-content {
        padding: 0 !important;
        height: 400px !important;
        position: relative !important;
    }

    .screenshot-slider {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .slider-container {
        width: 100% !important;
        height: 100% !important;
    }

    .slide {
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
    }

    .slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .slider-controls {
        bottom: 12px !important;
        padding: 10px 16px !important;
    }

    .slider-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }

    .slider-dots .dot {
        width: 8px !important;
        height: 8px !important;
    }

    /* Fix feature cards */
    .feature-card,
    .use-case-card,
    .pricing-card {
        padding: 24px 20px !important;
    }

    /* Fix analytics features layout */
    .analytics-feature {
        flex-direction: row !important;
        text-align: left !important;
    }

    .analytics-feature-icon {
        margin: 0 !important;
    }

    /* Fix API section */
    .code-window {
        max-width: 100%;
        overflow-x: auto;
    }

    .code-content {
        font-size: 12px;
    }

    /* Fix contact buttons */
    .contact-cta-buttons {
        flex-direction: column !important;
        width: 100%;
    }

    .contact-cta-buttons .btn {
        width: 100% !important;
    }

    /* Fix footer */
    .footer-content {
        grid-template-columns: 1fr !important;
    }

    .footer-section {
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .footer-bottom .footer-links {
        flex-direction: row;
        justify-content: center;
    }
}

/* Small Mobile Fixes (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px !important;
    }

    /* Fix hero */
    .hero {
        padding: 110px 0 50px !important;
    }

    .hero-main-content {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .hero-text {
        max-width: 100% !important;
        text-align: center;
    }

    .hero-visual {
        max-width: 100% !important;
        width: 100% !important;
    }

    .hero-title {
        font-size: 28px !important;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 15px !important;
    }

    /* Fix buttons */
    .btn-large {
        padding: 14px 24px !important;
        font-size: 15px !important;
    }

    /* Fix section titles */
    .section-title {
        font-size: 24px !important;
    }

    .section-subtitle {
        font-size: 15px !important;
    }

    /* Fix preview */
    .dashboard-preview {
        min-height: 350px;
    }

    .preview-content {
        padding: 0 !important;
        height: 350px !important;
        position: relative !important;
    }

    .screenshot-slider {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Hide slider arrow controls on very small screens */
    .slider-btn.prev,
    .slider-btn.next {
        display: none !important;
    }

    .slider-controls {
        bottom: 6px !important;
    }

    .slider-dots {
        gap: 6px;
    }

    .slider-dots .dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* Fix pricing hero */
    .pricing-hero {
        padding: 110px 0 24px !important;
    }

    .pricing-hero-title {
        font-size: 28px !important;
    }

    /* Fix article page */
    .article-heading {
        font-size: 28px !important;
    }

    .article-meta-header {
        flex-wrap: wrap;
    }

    /* Fix country tabs */
    .country-tab {
        font-size: 13px !important;
        padding: 8px 14px !important;
    }

    /* Fix footer */
    .footer-bottom .footer-links {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Extra Small Devices (max-width: 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 26px !important;
    }

    .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }

    .btn-large {
        padding: 13px 20px !important;
        font-size: 14px !important;
    }

    .section-title {
        font-size: 22px !important;
    }

    .feature-title,
    .use-case-title {
        font-size: 18px !important;
    }
}

/* ========================================
   ARTICLES CAROUSEL SECTION
   ======================================== */

.articles-carousel-section {
    background: var(--bg-secondary);
    padding: 100px 0;
}

.articles-carousel {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.carousel-track-container {
    overflow: hidden;
    flex: 1;
    border-radius: 16px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-article-card {
    min-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .carousel-article-card {
        min-width: 50%;
    }
}

@media (min-width: 1024px) {
    .carousel-article-card {
        min-width: 33.333%;
    }
}

.carousel-card-inner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.carousel-article-card:hover .carousel-card-inner {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.carousel-article-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.carousel-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-article-card:hover .carousel-article-image img {
    transform: scale(1.05);
}

.carousel-article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.carousel-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.carousel-article-country {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carousel-article-date {
    font-size: 13px;
    color: var(--text-tertiary);
}

.carousel-article-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.carousel-article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 16px;
    flex: 1;
}

.carousel-article-link {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.carousel-article-link:hover {
    color: #764ba2;
    transform: translateX(4px);
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    flex-shrink: 0;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
    transform: none;
}

.carousel-dots-container {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--text-tertiary);
}

.carousel-dot.active {
    background: var(--primary-gradient);
    width: 28px;
    border-radius: 5px;
}

.articles-cta {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.carousel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    color: var(--text-secondary);
}

.carousel-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.carousel-loading p {
    margin-top: 16px;
    font-size: 14px;
}

/* Responsive adjustments for articles carousel */
@media (max-width: 767px) {
    .articles-carousel-section {
        padding: 60px 0;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .articles-carousel {
        gap: 12px;
    }

    .carousel-article-content {
        padding: 20px;
    }

    .carousel-article-title {
        font-size: 16px;
    }

    .carousel-article-excerpt {
        font-size: 13px;
    }

    .articles-cta {
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .carousel-btn.carousel-prev,
    .carousel-btn.carousel-next {
        display: none;
    }

    .carousel-track-container {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .carousel-article-card {
        padding: 0 8px;
    }
}

/* Fix for landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px !important;
    }

    .preview-content {
        height: auto !important;
        min-height: 250px;
    }

    section {
        padding: 50px 0 !important;
    }
}