:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-elevated: #222222;
    --bg-hover: #2a2a2a;
    
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --text-accent: #00d4aa;
    
    --primary: #ff4757;
    --primary-dark: #e84118;
    --primary-glow: rgba(255, 71, 87, 0.15);
    --secondary: #ff3838;
    --accent: #ff6b6b;
    --danger: #ff3838;
    --success: #2ed573;
    --warning: #ffa502;
    
    --border-light: rgba(255, 255, 255, 0.15);
    --border-medium: rgba(255, 255, 255, 0.25);
    --border-strong: rgba(255, 255, 255, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 71, 87, 0.3);
    
    --code-bg: #1e1e1e;
    --code-border: #333333;
    --code-text: #e5e5e5;
    --code-comment: #6a737d;
    --code-string: #9ecbff;
    --code-keyword: #ff7b72;
    --code-number: #79c0ff;
    
    --focus-ring: 0 0 0 3px rgba(255, 71, 87, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--border-light);
    z-index: 100;
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    text-shadow: 0 0 10px var(--primary-glow);
    /* Clear focus state */
    outline: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo:focus {
    box-shadow: var(--focus-ring);
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    /* Clear focus state */
    outline: none;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

.nav-links a:focus {
    box-shadow: var(--focus-ring);
}

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

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

.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: radial-gradient(ellipse at top, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    animation: logoFloat 3s ease-in-out infinite;
}

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

.hero-badge {
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 56, 56, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--primary-glow);
    /* Ensure readability */
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    /* Improve readability */
    font-weight: 400;
}

.text-muted {
    color: var(--text-muted);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    /* Clear focus state */
    outline: none;
    min-height: 44px; /* Touch target size */
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn:focus {
    box-shadow: var(--focus-ring);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
    border: 2px solid var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.features {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    /* Clear hierarchy */
    line-height: 1.2;
}

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

.feature-card {
    background: var(--bg-tertiary);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 2px solid var(--border-light);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    /* Clear focus state */
    outline: none;
}

.feature-card:focus {
    box-shadow: var(--focus-ring);
}

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

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

.feature-card:hover,
.feature-card:focus {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
    background: var(--bg-elevated);
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.feature-svg {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) invert(1);
}

.feature-card h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    /* Clear hierarchy */
    line-height: 1.3;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    /* Improve readability */
    font-size: 1rem;
}

.download {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.download h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.download-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.download-card {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid var(--border-light);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
    background: var(--bg-elevated);
}

.platform-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--text-primary);
}

.platform-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.download-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.download-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.download-footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.package-managers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.package-command {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--code-text);
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
}

.stats {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255, 71, 87, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 56, 56, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

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

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px var(--primary-glow);
    /* Clear hierarchy */
    line-height: 1;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1rem;
    /* Clear hierarchy */
    line-height: 1.4;
}

.code-block {
    background: var(--code-bg);
    border: 2px solid var(--code-border);
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.code-header {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--code-border);
}

.code-content {
    padding: 1.5rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    color: var(--code-text);
}

.code-content .comment {
    color: var(--code-comment);
}

.code-content .string {
    color: var(--code-string);
}

.code-content .keyword {
    color: var(--code-keyword);
}

.code-content .number {
    color: var(--code-number);
}

.footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3rem 0;
    text-align: center;
    border-top: 2px solid var(--border-light);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
    /* Clear focus state */
    outline: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.footer a:hover,
.footer a:focus {
    color: var(--primary-dark);
    text-shadow: 0 0 8px var(--primary-glow);
}

.footer a:focus {
    box-shadow: var(--focus-ring);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .download-card {
        padding: 1.5rem;
    }
    
    .package-command {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 30px var(--primary-glow);
    }
}

.feature-card {
    animation: fadeInUp 0.6s ease forwards;
}

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

.feature-icon {
    animation: glow 3s ease-in-out infinite;
}

/* Performance Grid Styles */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.performance-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.performance-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.performance-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.performance-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
    text-shadow: 0 0 10px var(--primary-glow);
}

.performance-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.performance-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Comparison Table Styles */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: var(--bg-hover);
}

.comparison-table strong {
    color: var(--primary);
    font-weight: 700;
}

@media (prefers-contrast: high) {
    :root {
        --border-light: rgba(255, 255, 255, 0.5);
        --border-medium: rgba(255, 255, 255, 0.7);
        --text-secondary: #ffffff;
        --text-muted: #cccccc;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .feature-card {
        border-width: 3px;
    }
    
    .performance-card {
        border-width: 3px;
    }
} 