/* ============================================
   PurplEdge Global - Main Stylesheet
   Modern, Premium Trading Platform Design
   ============================================ */

:root {
    /* Color Palette */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --color-accent-primary: #8800ff;
    --color-accent-secondary: #00ff88;
    --color-accent-tertiary: #00f2ff;
    --color-gold: #FFD700;
    --color-pink: #FF4D8D;
    --color-text: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-success: #00ff88;
    --color-warning: #ffaa00;
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 10%, rgba(136, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: var(--color-accent-tertiary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-accent-secondary);
}

/* ============================================
   Utility Classes
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Glass Card Effect
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(136, 0, 255, 0.2);
    border-color: rgba(136, 0, 255, 0.3);
}

/* ============================================
   Navigation
   ============================================ */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

#main-header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-tertiary));
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
    color: #000;
    box-shadow: 0 4px 20px rgba(136, 0, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(136, 0, 255, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-accent-primary);
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-accent-primary);
    color: #000;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-block {
    width: 100%;
    display: block;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(136, 0, 255, 0.3) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.hero h1 {
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero .btn {
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ============================================
   Feature Cards
   ============================================ */

.feature-card {
    text-align: center;
    padding: 2.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--color-accent-tertiary);
}

.feature-card p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ============================================
   Stats/Metrics
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-accent-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   Testimonials
   ============================================ */

.testimonial {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    position: relative;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-tertiary));
}

.testimonial-name {
    font-weight: 600;
}

.testimonial-role {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ============================================
   Footer
   ============================================ */

footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1.5rem;
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--color-accent-tertiary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--color-accent-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding-top: 120px;
        min-height: 80vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   Animations & Effects
   ============================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Loading States
   ============================================ */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-accent-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
