/* ========================================
   LIM - London Investment Markets
   Premium Trading Platform Stylesheet
   ======================================== */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Primary Colors - Sophisticated Dark Theme */
    --lim-primary: #00d4ff;
    --lim-primary-dark: #00a8cc;
    --lim-primary-light: #33ddff;
    --lim-accent: #ff3d71;
    --lim-accent-glow: rgba(255, 61, 113, 0.3);
    
    /* Background Colors */
    --lim-bg-dark: #0a0e1a;
    --lim-bg-darker: #050810;
    --lim-bg-card: #111827;
    --lim-bg-card-hover: #1a2332;
    
    /* Text Colors */
    --lim-text-primary: #ffffff;
    --lim-text-secondary: #a0aec0;
    --lim-text-muted: #64748b;
    
    /* Border & Divider */
    --lim-border: rgba(255, 255, 255, 0.1);
    --lim-divider: rgba(0, 212, 255, 0.2);
    
    /* Gradients */
    --lim-gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    --lim-gradient-accent: linear-gradient(135deg, #ff3d71 0%, #ff0844 100%);
    --lim-gradient-dark: linear-gradient(180deg, #0a0e1a 0%, #050810 100%);
    --lim-gradient-card: linear-gradient(145deg, rgba(17, 24, 39, 0.9) 0%, rgba(10, 14, 26, 0.9) 100%);
    
    /* Shadows */
    --lim-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --lim-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --lim-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --lim-shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    
    /* Spacing */
    --section-padding: 120px;
    --section-padding-mobile: 60px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--lim-bg-dark);
    color: var(--lim-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    animation: pulse-glow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.main-content {
    position: relative;
    z-index: 1;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--lim-text-primary);
}

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); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--lim-text-secondary);
}

.text-gradient {
    background: var(--lim-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--lim-accent);
}

.text-primary-color {
    color: var(--lim-primary);
}

/* ==================== NAVIGATION ==================== */
.lim-navbar {
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--lim-border);
    padding: 1rem 0;
    transition: all var(--transition-smooth);
    z-index: 1000;
}

.lim-navbar.scrolled {
    background: rgba(10, 14, 26, 0.95);
    padding: 0.5rem 0;
    box-shadow: var(--lim-shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.navbar-brand:hover {
    transform: translateX(5px);
}

.brand-lim {
    font-size: 1.8rem;
    color: var(--lim-primary);
    letter-spacing: 0.1em;
    font-weight: 800;
}

.brand-divider {
    color: var(--lim-primary);
    opacity: 0.5;
}

.brand-text {
    font-size: 0.95rem;
    color: var(--lim-text-primary);
    letter-spacing: 0.15em;
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: var(--lim-text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--lim-gradient-primary);
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--lim-primary);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-toggler {
    border: 1px solid var(--lim-border);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25);
}

/* ==================== BUTTONS ==================== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-lim-primary {
    background: var(--lim-gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-lim-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
    color: white;
}

.btn-lim-outline {
    background: transparent;
    color: var(--lim-primary);
    border: 2px solid var(--lim-primary);
}

.btn-lim-outline:hover {
    background: var(--lim-primary);
    color: var(--lim-bg-dark);
    transform: translateY(-2px);
}

.btn-lim-accent {
    background: var(--lim-gradient-accent);
    color: white;
    box-shadow: 0 4px 15px var(--lim-accent-glow);
}

.btn-lim-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--lim-accent-glow);
    color: white;
}

/* ==================== CARDS ==================== */
.lim-card {
    background: var(--lim-gradient-card);
    border: 1px solid var(--lim-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.lim-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--lim-gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.lim-card:hover {
    background: var(--lim-bg-card-hover);
    border-color: var(--lim-primary);
    transform: translateY(-5px);
    box-shadow: var(--lim-shadow-glow);
}

.lim-card:hover::before {
    opacity: 1;
}

.lim-card-icon {
    width: 60px;
    height: 60px;
    background: var(--lim-gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.lim-card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--lim-text-primary);
}

.lim-card-text {
    color: var(--lim-text-secondary);
    margin-bottom: 0;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--lim-text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lim-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--lim-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trading-chart {
    width: 100%;
    height: 100%;
    background: var(--lim-gradient-card);
    border: 1px solid var(--lim-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: var(--lim-shadow-lg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--lim-border);
}

.chart-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--lim-text-primary);
}

.chart-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-text {
    color: #00ff88;
    font-size: 0.875rem;
    font-weight: 600;
}

.chart-canvas {
    width: 100%;
    height: 400px;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
    border-radius: 12px;
    position: relative;
}

/* ==================== FEATURES SECTION ==================== */
.features-section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-subtitle {
    color: var(--lim-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-description {
    color: var(--lim-text-secondary);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ==================== STATS BANNER ==================== */
.stats-banner {
    background: var(--lim-gradient-card);
    border: 1px solid var(--lim-border);
    border-radius: 20px;
    padding: 4rem 3rem;
    margin: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--lim-gradient-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

/* ==================== PRICING CARDS ==================== */
.pricing-card {
    background: var(--lim-gradient-card);
    border: 1px solid var(--lim-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--lim-primary);
    transform: scale(1.05);
}

/* Fix for MOST POPULAR badge */
.comparison-table thead th.featured-col {
    position: relative;
    padding-top: 3.5rem !important;
}

.comparison-table thead th.featured-col::after {
    content: '★ MOST POPULAR';
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lim-gradient-primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.comparison-table thead th.featured-col {
    padding-top: 3rem;
}

.pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--lim-primary);
    box-shadow: var(--lim-shadow-glow);
}

.pricing-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-price {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--lim-primary);
    margin-bottom: 0.5rem;
}

.pricing-period {
    color: var(--lim-text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--lim-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i {
    color: var(--lim-primary);
    font-size: 1.25rem;
}

/* ==================== FOOTER ==================== */
.lim-footer {
    background: var(--lim-bg-darker);
    border-top: 1px solid var(--lim-border);
    margin-top: 5rem;
}

.footer-grid {
    padding: 5rem 0 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 800;
}

.footer-tagline {
    color: var(--lim-text-muted);
    line-height: 1.8;
}

.footer-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--lim-text-secondary);
    font-size: 0.875rem;
}

.footer-stats i {
    color: var(--lim-primary);
    font-size: 1.25rem;
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--lim-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--lim-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--lim-primary);
    transform: translateX(5px);
}

.footer-newsletter-text {
    color: var(--lim-text-muted);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--lim-bg-card);
    border: 1px solid var(--lim-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lim-text-secondary);
    text-decoration: none;
    transition: all var(--transition-smooth);
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--lim-primary);
    border-color: var(--lim-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid var(--lim-border);
}

.footer-legal,
.footer-copyright {
    color: var(--lim-text-muted);
    font-size: 0.75rem;
    line-height: 1.6;
    font-weight: 400;
    font-family: var(--font-body);
    margin: 0;
}

.footer-legal {
    margin-bottom: 0.5rem;
}

.footer-badges {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.badge-item {
    background: var(--lim-bg-card);
    border: 1px solid var(--lim-primary);
    color: var(--lim-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* ==================== BACK TO TOP BUTTON ==================== */
.btn-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--lim-gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    z-index: 999;
    box-shadow: var(--lim-shadow-glow);
}

.btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

/* ==================== ANIMATIONS ==================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.animate-in {
    opacity: 1;
}

/* ==================== FORMS ==================== */
.form-control,
.form-select {
    background: var(--lim-bg-card);
    border: 1px solid var(--lim-border);
    color: var(--lim-text-primary);
    padding: 0.875rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: var(--lim-bg-card-hover);
    border-color: var(--lim-primary);
    color: var(--lim-text-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25);
}

.form-control::placeholder {
    color: var(--lim-text-muted);
}

.form-label {
    color: var(--lim-text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ==================== ALERTS ==================== */
.alert {
    border-radius: 12px;
    border: 1px solid;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.alert-danger {
    background: rgba(255, 61, 113, 0.1);
    border-color: rgba(255, 61, 113, 0.3);
    color: var(--lim-accent);
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--lim-primary);
}

/* ==================== BADGES ==================== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.badge-primary {
    background: var(--lim-gradient-primary);
    color: white;
}

.badge-success {
    background: #00ff88;
    color: var(--lim-bg-dark);
}

.badge-danger {
    background: var(--lim-gradient-accent);
    color: white;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .hero-section {
        padding-top: 120px;
    }
    
    .hero-visual {
        height: 400px;
        margin-top: 3rem;
    }
    
    .features-section,
    .stats-banner {
        padding: var(--section-padding-mobile) 0;
    }
    
    .stats-banner {
        padding: 3rem 2rem;
        margin: 3rem 0;
    }
}

@media (max-width: 767px) {
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem;
        border-bottom: 1px solid var(--lim-border);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .footer-badges {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

/* ==================== UTILITIES ==================== */
.container-fluid {
    max-width: 1400px;
}

.section-spacer {
    padding: var(--section-padding) 0;
}

@media (max-width: 991px) {
    .section-spacer {
        padding: var(--section-padding-mobile) 0;
    }
}

.bg-gradient-primary {
    background: var(--lim-gradient-primary);
}

.bg-gradient-dark {
    background: var(--lim-gradient-dark);
}

.border-gradient {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.border-gradient::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--lim-gradient-primary);
    border-radius: inherit;
    z-index: -1;
}