/* ========================================
   智芯科技 - 开发板企业网站样式
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #0f172a;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    --container-max: 1280px;
    --container-padding: 1.5rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--transition-base);
}

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

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

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

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

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

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

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

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.lang-btn.active {
    color: var(--text-white);
    background: var(--primary-color);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.circuit-pattern {
    position: absolute;
    inset: -50%;
    background-image: 
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(60deg);
    animation: circuitMove 20s linear infinite;
}

@keyframes circuitMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Board Showcase */
.board-showcase {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-card {
    position: absolute;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-slow);
}

.board-card.main {
    z-index: 2;
    transform: translateX(-20px);
}

.board-card.secondary {
    z-index: 1;
    transform: translateX(120px) translateY(40px) scale(0.85);
    opacity: 0.8;
}

.board-visual {
    width: 200px;
    height: 140px;
    background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.board-visual .chip {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-light);
    border: 1px solid #4a5568;
}

.board-visual .pins {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-visual .pins.left {
    left: 4px;
}

.board-visual .pins.right {
    right: 4px;
}

.board-visual .pins::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 14px 0 #fbbf24, 0 28px 0 #fbbf24, 0 42px 0 #fbbf24,
                0 56px 0 #fbbf24, 0 70px 0 #fbbf24, 0 84px 0 #fbbf24;
}

.board-label {
    display: block;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.23);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 80px 0;
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-white);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Section Header
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ========================================
   Products Section
   ======================================== */
.products {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.product-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-btn.active {
    color: var(--text-white);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

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

.product-card.hidden {
    display: none;
}

.product-image {
    position: relative;
    height: 220px;
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
}

/* Product Visual - PCB Styling */
.product-visual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcb {
    width: 160px;
    height: 100px;
    background: linear-gradient(145deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 6px;
    position: relative;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pcb.small {
    width: 120px;
    height: 80px;
}

.pcb.blue {
    background: linear-gradient(145deg, #0066cc 0%, #004499 100%);
}

.pcb.module-pcb {
    width: 140px;
    height: 110px;
    background: linear-gradient(145deg, #374151 0%, #1f2937 100%);
}

.main-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 700;
    color: #a0aec0;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-chip.stm {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
    color: #68d391;
}

.usb-port {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 10px;
    background: #1a202c;
    border-radius: 2px;
    border: 1px solid #4a5568;
}

.ethernet-port {
    position: absolute;
    top: 8px;
    right: 20px;
    width: 30px;
    height: 16px;
    background: #1a202c;
    border-radius: 2px;
    border: 1px solid #4a5568;
}

.st-link {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    background: #e53e3e;
    border-radius: 2px;
    font-size: 0.375rem;
    font-weight: 700;
    color: white;
}

.led {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4a5568;
}

.led-power {
    top: 8px;
    left: 12px;
    background: #f56565;
    box-shadow: 0 0 4px #f56565;
}

.led-status {
    top: 8px;
    left: 22px;
    background: #48bb78;
    box-shadow: 0 0 4px #48bb78;
    animation: ledBlink 2s infinite;
}

.led.blue {
    background: #4299e1;
    box-shadow: 0 0 4px #4299e1;
}

.led.green {
    background: #48bb78;
    box-shadow: 0 0 4px #48bb78;
}

@keyframes ledBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.pin-header {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pin-header.left {
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.pin-header.right {
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.pin-header.bottom {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
}

.pin-header span {
    width: 4px;
    height: 4px;
    background: #fbbf24;
    border-radius: 50%;
}

.pin-header.bottom span {
    width: 6px;
    height: 3px;
    border-radius: 1px;
}

/* Module specific styling */
.module-header {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
}

.sensor-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sensor {
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
    border-radius: 3px;
    border: 1px solid #4a5568;
}

.display-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.screen {
    width: 70px;
    height: 50px;
    background: #0f172a;
    border-radius: 3px;
    border: 2px solid #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-content {
    width: 80%;
    height: 70%;
}

.ui-line {
    height: 4px;
    background: #3b82f6;
    border-radius: 1px;
    margin-bottom: 4px;
}

.ui-line.short {
    width: 60%;
}

.ui-btn {
    width: 16px;
    height: 8px;
    background: #10b981;
    border-radius: 2px;
    margin-top: 8px;
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-gallery-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--text-white);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.product-card:hover .view-gallery-btn {
    transform: translateY(0);
}

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

/* Product Info */
.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-specs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.spec {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-full);
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   Downloads Section
   ======================================== */
.downloads {
    padding: 100px 0;
    background: var(--bg-primary);
}

.downloads-content {
    max-width: 1000px;
    margin: 0 auto;
}

.download-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.download-category {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.category-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon svg {
    width: 22px;
    height: 22px;
    color: var(--text-white);
}

.category-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
}

.download-list {
    padding: 0.75rem;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.download-item:hover {
    background: var(--bg-secondary);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.file-meta {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.download-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.download-link:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.download-link svg {
    width: 18px;
    height: 18px;
}

/* GitHub Section */
.github-section {
    margin-top: 2rem;
}

.github-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #24292e 0%, #1b1f23 100%);
    border-radius: var(--radius-lg);
    color: var(--text-white);
}

.github-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.github-info {
    flex: 1;
}

.github-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.github-info p {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

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

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
}

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

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

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* About Visual */
.about-visual {
    position: relative;
}

.lab-scene {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.workbench {
    position: relative;
    height: 300px;
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
}

.equipment {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.oscilloscope {
    width: 140px;
    height: 100px;
    padding: 0.75rem;
}

.oscilloscope .screen {
    height: 60px;
    background: #0f172a;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.waveform {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        #22c55e 2px,
        #22c55e 3px
    );
    animation: waveMove 1s linear infinite;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-4px); }
}

.oscilloscope .knobs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.oscilloscope .knobs span {
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
    border-radius: 50%;
}

.board-test {
    width: 120px;
    height: 100px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.test-board {
    width: 80px;
    height: 50px;
    background: linear-gradient(145deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-board .chip {
    font-size: 0.5rem;
    font-weight: 700;
    color: #68d391;
}

.test-board .pins {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.test-board .pins.left { left: 2px; }
.test-board .pins.right { right: 2px; }

.test-board .pins::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 7px 0 #fbbf24, 0 14px 0 #fbbf24, 0 21px 0 #fbbf24;
}

.leds {
    display: flex;
    gap: 0.5rem;
}

.leds span {
    width: 8px;
    height: 8px;
    background: #4a5568;
    border-radius: 50%;
}

.leds span.on {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.leds span.blink {
    background: #3b82f6;
    box-shadow: 0 0 6px #3b82f6;
    animation: ledBlink 1s infinite;
}

.tools {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.75rem;
}

.soldering-iron {
    width: 8px;
    height: 60px;
    background: linear-gradient(180deg, #4a5568 0%, #e53e3e 100%);
    border-radius: 4px;
}

.multimeter {
    width: 40px;
    height: 50px;
    background: linear-gradient(145deg, #fbbf24 0%, #d97706 100%);
    border-radius: 4px;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-white);
}

.contact-detail h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-detail p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}

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

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all var(--transition-fast);
    background: var(--bg-primary);
    padding: 0 0.25rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8125rem;
    color: var(--primary-color);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 60px 0 0;
    background: var(--bg-dark);
    color: var(--text-white);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-white);
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9375rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content.video-content {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-full);
    z-index: 10;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--error-color);
    color: var(--text-white);
}

.gallery-container {
    padding: 1rem;
}

.gallery-main {
    aspect-ratio: 16/10;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary-color);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container {
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    text-align: center;
    color: var(--text-white);
    cursor: pointer;
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform var(--transition-fast);
}

.video-placeholder:hover .play-button {
    transform: scale(1.1);
}

.play-button svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.video-hint {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .board-showcase {
        height: 300px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-categories {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        border-bottom: 1px solid var(--border-light);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    .language-switcher {
        position: fixed;
        top: 72px;
        right: 1rem;
        background: var(--bg-primary);
        padding: 0.75rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active + .language-switcher,
    .language-switcher.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .github-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .product-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scroll offset for fixed header */
section[id] {
    scroll-margin-top: 80px;
}
