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

:root {
    --red-primary: #dc2626;
    --red-secondary: #991b1b;
    --red-accent: #ef4444;
    --gold-primary: #d4af37;
    --gold-secondary: #b8960f;
    --gold-accent: #f4e4c1;
    --black-primary: #0a0a0a;
    --black-secondary: #1a1a1a;
}

body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: var(--red-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-accent);
}

/* Language Toggle */
.lang-zh {
    display: inline;
}

.lang-en {
    display: none;
}

body.en .lang-zh {
    display: none;
}

body.en .lang-en {
    display: inline;
}

/* Ensure nav links don't have display issues */
.nav-link .lang-zh,
.nav-link .lang-en {
    white-space: nowrap;
}

/* Fix navigation overlap issues */
nav {
    min-height: 72px;
    position: fixed !important;
    z-index: 9999 !important;
}

nav .container {
    position: relative;
    z-index: 10;
}

/* Ensure sections don't overlap with fixed nav */
section {
    position: relative;
    z-index: 1;
}

/* Add scroll padding for anchor links */
section[id] {
    scroll-margin-top: 85px;
}

#home {
    padding-top: 72px;
    min-height: 100vh;
}

/* Ensure content doesn't go under nav */
.container {
    position: relative;
}

/* Hero background image enhancement */
#home img {
    filter: brightness(1.1) contrast(0.95);
}

/* Weapon icons animation */
.weapon-icon {
    transition: all 0.3s ease;
    position: relative;
}

.weapon-icon:before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weapon-icon:hover:before {
    opacity: 0.3;
}

.weapon-icon:hover svg {
    transform: rotate(45deg) scale(1.15);
}

.weapon-icon svg {
    transition: all 0.3s ease;
}

/* Gold accent animations */
.gold-glow {
    animation: goldPulse 3s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
    }
}

/* Tech card hover effects */
.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

/* Navigation Animation */
nav {
    transition: all 0.3s ease;
    background: rgb(0, 0, 0);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

nav.scrolled {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(0, 0, 0, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

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

.nav-link:not(.bg-red-600):hover:after {
    width: 100%;
}

/* Hero Section Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glow Effects */
.glow-red {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5),
                0 0 40px rgba(220, 38, 38, 0.3),
                0 0 60px rgba(220, 38, 38, 0.1);
}

.text-glow {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

/* Card Hover Effects */
.tech-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--red-primary), transparent, var(--red-primary));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.tech-card:hover:before {
    opacity: 1;
}

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

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover:before {
    width: 300px;
    height: 300px;
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Product Image Hover */
.product-image {
    transition: transform 0.5s ease;
}

.product-image:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Feature Icons Animation */
.feature-icon {
    animation: float 3s ease-in-out infinite;
}

.feature-icon:nth-child(2) {
    animation-delay: 0.5s;
}

.feature-icon:nth-child(3) {
    animation-delay: 1s;
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-number {
    animation: countUp 1s ease-out;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
    transform-origin: top;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--red-primary), var(--red-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Line Animation */
@keyframes line-grow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.line-animation {
    position: relative;
}

.line-animation:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--red-primary);
    animation: line-grow 1s ease-out forwards;
}

/* Comparison Table Animation */
.comparison-item {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.comparison-item:nth-child(1) { animation-delay: 0.1s; }
.comparison-item:nth-child(2) { animation-delay: 0.2s; }
.comparison-item:nth-child(3) { animation-delay: 0.3s; }
.comparison-item:nth-child(4) { animation-delay: 0.4s; }
.comparison-item:nth-child(5) { animation-delay: 0.5s; }

/* Success Message Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#success-message:not(.hidden) {
    animation: slideDown 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-7xl {
        font-size: 3rem;
    }
}

/* High-tech Grid Background */
.tech-grid {
    position: relative;
    overflow: hidden;
}

.tech-grid:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 10s linear infinite;
}

@keyframes grid-move {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(50px, 50px);
    }
}

/* Neon Glow Effect */
.neon-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(#000, #000) padding-box,
                linear-gradient(45deg, var(--red-primary), transparent, var(--red-primary)) border-box;
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.8),
                    0 0 40px rgba(220, 38, 38, 0.4);
    }
}

/* Blade Slash Animation */
@keyframes blade-slash {
    from {
        clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
    }
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.blade-reveal {
    animation: blade-slash 1s ease-out forwards;
}

/* Sport Energy Lines */
.energy-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.energy-lines:before,
.energy-lines:after {
    content: '';
    position: absolute;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
    animation: energy-flow 3s linear infinite;
}

.energy-lines:before {
    top: 20%;
    animation-delay: 0s;
}

.energy-lines:after {
    bottom: 20%;
    animation-delay: 1.5s;
}

@keyframes energy-flow {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* Custom Tailwind Config */
@layer utilities {
    .text-balance {
        text-wrap: balance;
    }
    
    .perspective-1000 {
        perspective: 1000px;
    }
    
    .transform-3d {
        transform-style: preserve-3d;
    }
}