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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* Header & Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1.5rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 300;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 4rem 0;
    color: white;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-alt {
    background-color: var(--bg-white);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.info-box h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

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

.chipset-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.chipset-list li:last-child {
    border-bottom: none;
}

/* Wiring Section */
.wiring-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.tip-box {
    background: #ecfdf5;
    border: 1px solid #10b981;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.connection-list {
    list-style: none;
    margin-top: 1rem;
}

.connection-list li {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Configuration Section */
.config-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.config-card {
    background: var(--bg-white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.config-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-header h3 {
    font-size: 1.5rem;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-legacy {
    background: rgba(245, 158, 11, 0.3);
}

.config-content {
    padding: 2rem;
}

.config-content h4 {
    color: var(--primary-dark);
    margin: 2rem 0 1rem 0;
    font-size: 1.25rem;
}

.config-content h4:first-child {
    margin-top: 0;
}

.setup-steps {
    margin-left: 1.5rem;
    color: var(--text-light);
}

.setup-steps li {
    padding: 0.5rem 0;
}

.code-box {
    background: #f3f4f6;
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.feature-list {
    list-style: none;
    margin-left: 1rem;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.feature-list code {
    background: #1f2937;
    color: #10b981;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

.warning-box {
    background: #fef3c7;
    border: 1px solid var(--warning);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    color: #92400e;
}

/* Applications Section */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-color);
}

.app-card h4 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.app-card ul {
    list-style: none;
}

.app-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    border-bottom: 1px solid #f3f4f6;
}

.app-card li:last-child {
    border-bottom: none;
}

/* Rankings Section */
.rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.rank-card {
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s ease;
}

.rank-card:hover {
    transform: translateY(-5px);
}

.rank-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.rank-excellent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.rank-excellent .rank-badge {
    background: rgba(255, 255, 255, 0.2);
}

.rank-good {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.rank-good .rank-badge {
    background: rgba(255, 255, 255, 0.2);
}

.rank-mixed {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.rank-mixed .rank-badge {
    background: rgba(255, 255, 255, 0.2);
}

.rank-varied {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.rank-varied .rank-badge {
    background: rgba(255, 255, 255, 0.2);
}

.rank-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

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

.footer-content p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.disclaimer {
    font-size: 0.875rem;
    margin-top: 1rem;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        gap: 1rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .content-grid,
    .wiring-content,
    .config-tabs,
    .app-grid,
    .rankings {
        grid-template-columns: 1fr;
    }

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

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

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

.card,
.app-card,
.rank-card {
    animation: fadeIn 0.6s ease-out;
}
