/* Enhanced Ares Market CSS - Modern Styling and Animations */

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

:root {
    /* Enhanced Color Palette */
    --background: #0a0a0a;
    --foreground: #f5f5f5;
    --card: #1a1a1a;
    --card-foreground: #f5f5f5;
    --primary: #8B0000;
    --primary-foreground: #f5f5f5;
    --secondary: #696969;
    --secondary-foreground: #f5f5f5;
    --muted: #2a2a2a;
    --muted-foreground: #a0a0a0;
    --accent: #CD853F;
    --accent-foreground: #0a0a0a;
    --destructive: #DC143C;
    --border: #333333;
    --radius: 0.625rem;
    
    /* Animation Variables */
    --transition-fast: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Container with Animated Background */
.container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #0a0a0a 50%, #1a1a1a 75%, #0a0a0a 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease-in-out infinite;
    position: relative;
}

.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(205, 133, 63, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

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

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 6px;
    border: 2px solid var(--muted);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--destructive) 0%, var(--accent) 100%);
}

/* Advanced Animations */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 50% 0%; }
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(139, 0, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(139, 0, 0, 0.6);
        transform: scale(1.02);
    }
}

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

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Enhanced Utility Classes */
.spartan-glow {
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.4);
    transition: box-shadow var(--transition-normal);
}

.spartan-glow:hover {
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.7);
}

.shield-glow {
    position: relative;
    overflow: hidden;
}

.shield-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.15) 0%, transparent 70%);
    animation: pulseGlow 4s ease-in-out infinite;
    z-index: 1;
}

.shield-glow > * {
    position: relative;
    z-index: 2;
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--accent);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hover-scale {
    transition: all var(--transition-normal);
    cursor: pointer;
}

.hover-scale:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
}

.float-animation {
    animation: floatAnimation 6s ease-in-out infinite;
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Enhanced Navigation */
.terminal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(205, 133, 63, 0.3);
    transition: all var(--transition-normal);
}

.terminal-nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    transition: padding var(--transition-normal);
}

.terminal-nav.scrolled .nav-content {
    padding: var(--space-md) 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo {
    height: 5rem;
    width: 150px;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 0 10px rgba(205, 133, 63, 0.3));
}

.terminal-nav.scrolled .logo {
    height: 4rem;
    width: 120px;
}

.logo:hover {
    filter: drop-shadow(0 0 20px rgba(205, 133, 63, 0.6));
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-item {
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    border-bottom: 2px solid transparent;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-item:hover::before,
.nav-item.active::before {
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    color: var(--accent);
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: var(--space-sm);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent);
    transition: all var(--transition-normal);
    border-radius: 2px;
}

/* Enhanced Hero Section */
.hero-section {
    padding: 8rem var(--space-lg) 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulseGlow 8s ease-in-out infinite;
    z-index: 1;
}

.hero-content {
    max-width: 64rem;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--space-xl);
    color: var(--foreground);
    text-shadow: 0 0 20px rgba(205, 133, 63, 0.3);
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--accent);
    margin-bottom: var(--space-2xl);
    font-weight: 600;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted-foreground);
    max-width: 48rem;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 1s both;
    line-height: 1.8;
}

/* Enhanced Sections */
.section {
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
}

.section:nth-child(even) {
    background: rgba(26, 26, 26, 0.3);
}

.section-container {
    max-width: 96rem;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: var(--foreground);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Enhanced About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    margin-top: var(--space-2xl);
}

.about-text {
    animation: slideInFromLeft 1s ease-out;
}

.about-description {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    color: var(--foreground);
    line-height: 1.8;
}

.feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.feature-card {
    background: var(--card);
    padding: var(--space-xl);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(205, 133, 63, 0.1), transparent);
    transition: left var(--transition-slow);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.2);
    border-color: var(--accent);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.feature-title {
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--foreground);
    font-size: 1.125rem;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.about-image {
    animation: slideInFromRight 1s ease-out;
}

.about-image .image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-normal);
}

.about-image .image:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

/* Enhanced Features Section */
.features-section {
    padding: var(--space-3xl) var(--space-lg);
    background: rgba(26, 26, 26, 0.5);
    position: relative;
}

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

.feature-item {
    background: var(--card);
    padding: var(--space-xl);
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
    border-color: var(--accent);
}

.feature-item .feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    color: var(--accent);
    transition: all var(--transition-normal);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(205, 133, 63, 0.5));
}

.feature-item .feature-title {
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--foreground);
    font-size: 1.25rem;
}

.feature-item .feature-desc {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Enhanced Mirror Cards */
.mirrors-container {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.mirrors-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: var(--space-2xl);
    line-height: 1.8;
}

.mirrors-list {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.mirror-card {
    background: var(--card);
    padding: var(--space-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.mirror-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.mirror-card:hover::before {
    transform: scaleY(1);
}

.mirror-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.2);
    border-color: var(--accent);
}

.mirror-card a {
    color: var(--accent);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.mirror-card a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(205, 133, 63, 0.5);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-section {
        padding: 6rem var(--space-lg) 4rem;
    }
    
    .about-grid,
    .ordering-grid,
    .security-grid,
    .crypto-grid,
    .rules-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--space-2xl) var(--space-lg);
    }
}

@media (max-width: 480px) {
    .section {
        padding: var(--space-xl) var(--space-md);
    }
    
    .hero-section {
        padding: 4rem var(--space-md) 2rem;
    }
    
    .nav-container {
        padding: 0 var(--space-md);
    }
}

/* Animation Classes for JavaScript */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease forwards;
}

.animate-slide-left {
    animation: slideInFromLeft 0.6s ease forwards;
}

.animate-slide-right {
    animation: slideInFromRight 0.6s ease forwards;
}

/* Loading Animation */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* Enhanced Focus States for Accessibility */
*:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus,
.nav-item:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Print Styles */
@media print {
    .terminal-nav,
    .mobile-menu-toggle {
        display: none;
    }
    
    .container {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

