:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #00ff88;
    --accent-secondary: #ff0080;
    --gradient: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 20px 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 128, 0.2) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

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

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

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

.hero-subtitle {
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 2rem 0;
    max-width: 500px;
}

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

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.keyboard-showcase {
    position: relative;
    width: 400px;
    height: 200px;
}

.keyboard-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 120px;
    background: var(--gradient);
    border-radius: 20px;
    opacity: 0.3;
    filter: blur(40px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Update hero 3D keyboard with actual keyboard image */
.keyboard-3d {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 120px;
    background: url('keychron_k8_pro.png') center/contain no-repeat;
    border-radius: 10px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    animation: float-keyboard 4s ease-in-out infinite;
}

@keyframes float-keyboard {
    0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); }
    50% { transform: translate(-50%, -50%) rotate(2deg); }
}

/* Remove the ::before pseudo-element that was generating the fake keys */
.keyboard-3d::before {
    display: none;
}

/* Products Section */
.products {
    padding: 100px 0;
}

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

.product-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
}

.product-image {
    position: relative;
    height: 300px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(50px);
    animation: pulse 3s ease-in-out infinite;
}

.keyboard-preview {
    width: 200px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    position: relative;
}

.keyboard-preview::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--bg-secondary) 0px,
        var(--bg-secondary) 10px,
        transparent 10px,
        transparent 14px
    );
    border-radius: 5px;
}

.keyboard-preview-image {
    width: 80%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
}

.product-card:hover .keyboard-preview-image {
    transform: scale(1.05);
}

.product-info {
    padding: 2rem;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: none;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-right: 0.5rem;
    display: none;
}

.add-to-cart {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--bg-primary);
    cursor: pointer;
    transition: transform 0.3s;
}

.add-to-cart:hover {
    transform: scale(1.1);
}

/* Customize Section */
.customize {
    padding: 100px 0;
    background: var(--bg-secondary);
}

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

.customize-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Update customizer preview with image */
.customizer-preview {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border);
    position: relative;
}

.keyboard-builder {
    max-width: 100%;
    margin: 0 auto;
}

.builder-display {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    overflow: hidden;
}

.builder-display img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    border-radius: 10px;
}

.keys-container {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 2px;
}

.key {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border-radius: 3px;
    transition: all 0.3s;
    cursor: pointer;
}

.key:hover {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.builder-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

.option {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.option.active,
.option:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.color-picker input {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

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

.link-group h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

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

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

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .customize-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}