/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color System from popup.css */
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e3e3e5;
    --border-strong: #d1cff6;
    --accent: #5046e4;
    --accent-700: #4338ca;
    --accent-900: #312e81;
    --text-primary: #222222;
    --text-secondary: #6c6d70;
    --text-muted: #64748b;
    --header-bg: #ffffff;
    --tip-bg: #e7e6fa;
    --tip-text: #552c9c;
    
    /* Extended color palette */
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Spacing system */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent);
}

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

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

/* CTA Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.cta-button.primary {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.cta-button.primary:hover {
    background: var(--accent-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.cta-button.secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.cta-button.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button.large {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

/* Hero Section */
.hero {
    padding: 120px 0 var(--space-24);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-muted) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(45deg, rgba(80, 70, 228, 0.1) 0%, rgba(103, 126, 234, 0.05) 100%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Browser Mockup */
.browser-mockup {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.browser-mockup:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(2deg);
}

.browser-header {
    background: #f1f5f9;
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: var(--space-2);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.browser-url {
    background: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-muted);
    flex: 1;
}

.browser-content {
    padding: var(--space-6);
    background: white;
}

.article-text h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.article-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Highlight Demo */
.highlight-demo {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid;
    position: relative;
}

.highlight-demo.yellow {
    background: rgba(251, 190, 37, 0.3);
    color: #92400e;
    border-bottom-color: #fbbf25;
}

.highlight-demo.blue {
    background: rgba(60, 129, 246, 0.3);
    color: #1d4ed8;
    border-bottom-color: #3c81f6;
}

.highlight-demo.green {
    background: rgba(19, 185, 129, 0.3);
    color: #047857;
    border-bottom-color: #13b981;
}

.highlight-demo.pink {
    background: rgba(238, 71, 153, 0.3);
    color: #be185d;
    border-bottom-color: #ee4799;
}

.highlight-demo:hover {
    transform: scale(1.05);
}



/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features {
    padding: var(--space-24) 0;
    background: var(--surface);
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--gradient-end) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-strong);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--space-6);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

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

/* How It Works Section */
.how-it-works {
    padding: var(--space-24) 0;
    background: var(--surface-muted);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-12);
    align-items: stretch;
}

.step {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto var(--space-6);
    box-shadow: var(--shadow-lg);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.7;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-visual {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    margin-top: var(--space-6);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Step Visuals */
.dropdown-demo {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: left;
}

.dropdown-demo-header {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.dropdown-demo-value {
    font-weight: 600;
    color: var(--text-primary);
}

.scan-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.scan-button-demo {
    background: var(--accent);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.colors-demo {
    display: flex;
    gap: var(--space-2);
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.color-dot.yellow { background: #fbbf25; }
.color-dot.orange { background: #fb933e; }
.color-dot.blue { background: #3c81f6; }
.color-dot.green { background: #13b981; }
.color-dot.pink { background: #ee4799; }
.color-dot.purple { background: #905ffc; }

.definition-demo {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.highlighted-word {
    background: rgba(251, 190, 37, 0.3);
    color: #92400e;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-block;
    margin-bottom: var(--space-2);
    flex-shrink: 0;
}

.definition-tooltip {
    background: var(--text-primary);
    color: white;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    max-width: 220px;
    margin: var(--space-2) auto 0;
    position: relative;
    flex-shrink: 0;
}

.definition-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--text-primary);
}

/* Installation Section */
.installation {
    padding: var(--space-24) 0;
    background: var(--surface);
}

.installation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.installation-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.method {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.method-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.method-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.method-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

.installation-steps ol {
    padding-left: var(--space-5);
    color: var(--text-secondary);
}

.installation-steps li {
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.installation-steps code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--accent);
}

/* Extension Preview */
.extension-preview {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    margin: 0 auto;
}

.extension-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.extension-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
}

.extension-info h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.extension-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
}

.feature-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-16);
    margin-bottom: var(--space-12);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
}

.footer-brand-text h4 {
    color: white;
    margin-bottom: var(--space-1);
}

.footer-brand-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    align-items: center;
}

.footer-section h5 {
    color: white;
    margin-bottom: var(--space-4);
    font-weight: 600;
    display: none;
}

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

.footer-section li {
    margin-bottom: var(--space-2);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }
    
    .installation-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-8);
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--space-4);
        height: 70px;
    }
    
    .nav-actions {
        gap: var(--space-4);
    }
    
    .nav-link {
        display: none;
    }
    
    .hero {
        padding: 100px 0 var(--space-16);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .container {
        padding: 0 var(--space-4);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .cta-button.large {
        padding: var(--space-3) var(--space-6);
        font-size: 0.875rem;
    }
    
    .browser-mockup {
        transform: none;
    }
    
    .browser-mockup:hover {
        transform: none;
    }
}

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

.feature-card,
.step,
.method {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Focus states for accessibility */
.cta-button:focus,
.nav-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
