/* ============================================================================
   instaTrader Theme - Main Stylesheet
   ============================================================================ */

/* Variables */
:root {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: #5eead4;
    --primary-glow: rgba(20, 184, 166, 0.4);
    
    --bg-darkest: #0a0e12;
    --bg-dark: #0f1419;
    --bg-medium: #1a2332;
    --bg-light: #243040;
    --bg-card: rgba(26, 35, 50, 0.6);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --buy: #22c55e;
    --sell: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
    
    --gradient-radial: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20, 184, 166, 0.15) 0%, transparent 50%);
    --gradient-glow: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

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

/* ============================================================================
   HEADER / NAVIGATION
   ============================================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 14, 18, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links li a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links li a:hover {
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--primary-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: var(--gradient-radial);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

/* Platform Preview */
.platform-preview {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 60px var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-preview::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--primary));
    border-radius: 18px;
    z-index: -1;
    opacity: 0.3;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-medium);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dot:nth-child(1) { background: #ef4444; }
.browser-dot:nth-child(2) { background: #f59e0b; }
.browser-dot:nth-child(3) { background: #22c55e; }

.browser-url {
    flex: 1;
    margin-left: 12px;
    padding: 6px 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.chart-preview {
    background: var(--bg-dark);
    padding: 20px;
    min-height: 400px;
    position: relative;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-toolbar span {
    font-size: 13px;
    color: var(--text-secondary);
}

.tf-buttons {
    display: flex;
    gap: 4px;
}

.tf-btn {
    padding: 4px 10px;
    background: var(--bg-medium);
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

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

/* Animated Chart */
.chart-canvas {
    width: 100%;
    height: 300px;
    position: relative;
}

.candle-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    padding: 0 10px;
}

.candle {
    width: 8px;
    position: relative;
    animation: candleGrow 1.5s ease-out forwards;
}

.candle.green {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.candle.red {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

@keyframes candleGrow {
    from { height: 0; opacity: 0; }
    to { opacity: 1; }
}

.price-axis {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: var(--bg-medium);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.current-price {
    position: absolute;
    right: 60px;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px 0 0 4px;
    animation: priceFlash 2s infinite;
}

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

/* ============================================================================
   FEATURES SECTION
   ============================================================================ */
.features {
    padding: 100px 0;
    position: relative;
}

.section-badge {
    display: inline-flex;
    padding: 6px 14px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.3);
}

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

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-illustration {
    height: 140px;
    background: var(--bg-medium);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Illustrations */
.illustration-repetition {
    display: flex;
    gap: 16px;
}

.repeat-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.repeat-arrow {
    font-size: 20px;
    color: var(--primary);
}

.illustration-opportunities {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opp-bar {
    height: 24px;
    border-radius: 6px;
}

.opp-bar:nth-child(1) {
    width: 120px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.3), transparent);
}

.opp-bar:nth-child(2) {
    width: 80px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), transparent);
}

.crypto-icons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.crypto-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.crypto-icon.btc { background: #f7931a; color: white; }
.crypto-icon.eth { background: #627eea; color: white; }
.crypto-icon.usd { background: #22c55e; color: white; }

.illustration-expertise {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.expertise-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.expertise-bar:nth-child(1) { width: 140px; }
.expertise-bar:nth-child(2) { width: 120px; }
.expertise-bar:nth-child(3) { width: 100px; }
.expertise-bar:nth-child(4) { width: 80px; }
.expertise-bar:nth-child(5) { width: 60px; }

.expertise-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--primary);
    animation: expertiseGrow 2s ease-out forwards;
}

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

/* ============================================================================
   LEARN SECTION
   ============================================================================ */
.learn-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
}

.learn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.learn-image-main {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.placeholder-img {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-chart {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 40px;
}

.mini-chart .bar {
    width: 20px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px 4px 0 0;
    animation: barGrow 1s ease-out forwards;
}

@keyframes barGrow {
    from { height: 0; }
}

.learn-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.learn-content h2 span {
    color: var(--primary);
}

.learn-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ============================================================================
   TESTIMONIALS
   ============================================================================ */
.testimonials {
    padding: 100px 0;
    text-align: center;
}

.testimonials-slider {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    max-width: 350px;
    text-align: left;
}

.testimonial-stars {
    color: #f59e0b;
    margin-bottom: 16px;
    font-size: 18px;
}

.testimonial-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.testimonial-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.testimonial-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.testimonial-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================================
   PARTNERS
   ============================================================================ */
.partners {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.partners-title {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.partners-title span {
    color: var(--text-primary);
    font-weight: 600;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
    opacity: 0.6;
}

.partner-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */
.cta-section {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: var(--gradient-glow);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content h2 span {
    color: var(--primary);
}

.cta-content p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.site-footer {
    padding: 60px 0 30px;
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

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

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

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-column a {
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.footer-newsletter p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--primary);
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

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

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .learn-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .learn-content {
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links,
    .main-nav .btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .testimonials-slider {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
}
