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

html {
    overflow-x: hidden;
    width: 100%;
    height: auto;
    min-height: 100%;
}

:root {
    /* Modern Color Palette - Inspired by Palantir */
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #3385ff;
    --secondary: #6366f1;
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Neutrals */
    --bg-primary: #0a0e27;
    --bg-secondary: #151b35;
    --bg-tertiary: #1e2642;
    --surface: rgba(30, 38, 66, 0.6);
    --surface-hover: rgba(30, 38, 66, 0.8);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    /* Borders & Shadows */
    --border: rgba(99, 102, 241, 0.2);
    --border-hover: rgba(99, 102, 241, 0.4);
    --glow: 0 0 20px rgba(0, 102, 255, 0.3);
    --glow-intense: 0 0 40px rgba(0, 102, 255, 0.5);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #6366f1 100%);
    --gradient-surface: linear-gradient(135deg, rgba(30, 38, 66, 0.8) 0%, rgba(21, 27, 53, 0.8) 100%);
    --gradient-hover: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #0066ff 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -250px;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(100px, -100px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* Navigation */
.navbar {
    background: var(--surface);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-logo i {
    color: var(--primary);
    font-size: 1.75rem;
}

/* Language Selector */
.language-selector {
    margin-left: auto;
}

.language-select {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.language-select:hover {
    border-color: var(--primary);
    background: rgba(0, 102, 255, 0.05);
}

.language-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.language-select option {
    background: var(--background);
    color: var(--text-primary);
    padding: 0.5rem;
}

.nav-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-outline {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 102, 255, 0.05);
}

.btn-primary-small {
    padding: 0.625rem 1.25rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    margin-bottom: 4rem;
}

@media (max-width: 1200px) {
    .main-content {
        max-width: 100%;
    }
}


/* Glass Panel */
.glass-panel {
    background: var(--surface);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease;
}

.glass-panel:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow);
}

.config-panel {
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-tertiary);
}

.config-panel::-webkit-scrollbar {
    width: 6px;
}

.config-panel::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.config-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.panel-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.panel-header h2 i {
    color: var(--primary);
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form Sections */
.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--border-hover);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.section-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

label i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Input Styles */
input[type="text"],
input[type="number"],
input[type="date"],
.symbol-search {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
.symbol-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    background: var(--bg-secondary);
}

small {
    display: block;
    margin-top: 0.375rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Custom Select */
.custom-select-wrapper {
    position: relative;
}

.symbol-search {
    padding-right: 2.5rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.asset-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.asset-dropdown.active {
    display: block;
}

.asset-category {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.asset-category:first-child {
    border-top: none;
}

.asset-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

.asset-option:hover {
    background: var(--surface-hover);
    border-left-color: var(--primary);
}

.asset-name {
    font-weight: 500;
    color: var(--text-primary);
}

.asset-symbol {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Range Sliders */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--glow);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

.slider-value {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.slider-value span {
    color: var(--primary);
}

/* Toggle Group */
.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-label {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toggle-label:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.toggle-group input[type="radio"]:checked + .toggle-label {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--glow);
}

/* Quick Date Buttons */
.quick-date-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-date-btn {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-date-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.quick-date-btn:active {
    transform: scale(0.95);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

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

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn-twitter {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #000000, #14171A);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-twitter:hover {
    background: linear-gradient(135deg, #14171A, #1DA1F2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.3);
}

.btn-outline {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 102, 255, 0.1);
}

.btn-icon {
    font-size: 1.25rem;
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Panel */
.results-panel {
    grid-column: 1 / -1;
    max-width: 100%;
    overflow-x: hidden;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Hero Metrics */
.metrics-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

.metric-hero-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.metric-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
    border-color: var(--primary);
}

.metric-hero-card.primary {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.metric-hero-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.metric-hero-content {
    flex: 1;
}

.metric-hero-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.metric-hero-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.metric-hero-change {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

.chart-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    max-width: 100%;
    overflow-x: hidden;
}

.chart-card:hover {
    border-color: var(--border-hover);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.chart-header h3 i {
    color: var(--primary);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-control-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-control-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chart-control-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.chart-container canvas {
    max-height: 350px;
}

/* Detailed Metrics */
.metrics-detailed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

.metrics-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.metrics-section h3 i {
    color: var(--primary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 100%;
    overflow-x: hidden;
}

.metric-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.metric-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.positive {
    color: var(--success);
}

.metric-value.negative {
    color: var(--danger);
}

/* Trades Table */
.trades-table-section {
    background: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.table-header h3 i {
    color: var(--primary);
}

.table-controls {
    display: flex;
    gap: 0.75rem;
}

.search-input,
.filter-select {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.trades-table thead {
    background: var(--bg-tertiary);
    position: sticky;
    top: 0;
}

.trades-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.trades-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.trades-table tbody tr {
    transition: all 0.2s ease;
}

.trades-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.trade-positive {
    color: var(--success);
    font-weight: 600;
}

.trade-negative {
    color: var(--danger);
    font-weight: 600;
}

.trade-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-stop-loss {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.badge-eod {
    background: rgba(99, 102, 241, 0.2);
    color: var(--secondary);
}

.table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    z-index: 2000;
    max-width: 400px;
}

.error-toast {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.success-toast {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.toast i {
    font-size: 1.25rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .metrics-hero {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .config-panel {
        position: relative;
        top: 0;
        max-height: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-date-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-hero {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-hero-card {
        padding: 1rem;
        flex-direction: row;
    }

    .metric-hero-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .metric-hero-value {
        font-size: 1.5rem;
    }

    .metric-hero-label {
        font-size: 0.8rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chart-card {
        padding: 1rem;
        max-width: 100%;
    }

    .chart-container {
        max-width: 100%;
        overflow-x: hidden;
    }

    .chart-container canvas {
        max-height: 250px !important;
        max-width: 100% !important;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .header-actions button {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .table-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    /* Results panel header */
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .panel-header h2 {
        font-size: 1.25rem;
    }

    .panel-header p {
        font-size: 0.85rem;
    }

    /* Metrics detailed sections */
    .metrics-detailed {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .metrics-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

/* ========== LANDING PAGE STYLES ========== */

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.hero-badge i {
    color: var(--success);
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.btn-primary-large,
.btn-outline-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary-large {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px -5px rgba(99, 102, 241, 0.5);
}

.btn-outline-large {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline-large:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.02));
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Results Section */
.results-section {
    padding: 6rem 0;
    background: var(--surface);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease both;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }

.result-card.highlight {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
    box-shadow: var(--glow);
}

.result-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.result-symbol {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-symbol i {
    color: var(--primary);
}

.result-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-badge.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-main {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.result-value.positive {
    color: var(--success);
}

.result-details {
    display: grid;
    gap: 0.75rem;
}

.result-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-value.positive {
    color: var(--success);
}

/* Results CTA */
.results-cta {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
    border: 1px solid var(--border);
    border-radius: 16px;
}

.results-cta-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.results-cta-text i {
    color: var(--primary);
}

/* How It Works Section */
.how-it-works-section {
    padding: 6rem 0;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease both;
}

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(3) { animation-delay: 0.2s; }
.step-card:nth-child(5) { animation-delay: 0.3s; }

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1.5rem;
    font-size: 2rem;
    color: var(--primary);
}

.step-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Responsive Landing Page */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-large,
    .btn-outline-large {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .step-card {
        max-width: 100%;
    }
}

/* ========== CALCULATOR STYLES ========== */

.premium-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

.nav-item.premium-feature {
    position: relative;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
}

.calculator-panel,
.calculator-results {
    height: fit-content;
}

.calculator-result-hero {
    margin: 2rem 0;
}

.result-main-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--glow);
}

.result-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.result-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.result-value-primary {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.result-value-secondary {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.calculator-details {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.calculator-details h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border);
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.detail-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.detail-value.danger {
    color: var(--danger);
    font-size: 1.3rem;
}

.calculator-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.calculator-warning i {
    color: #f59e0b;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.calculator-warning p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Footer Styles */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.8rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.footer-links i {
    color: var(--primary);
    font-size: 0.9rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.footer-disclaimer i {
    color: var(--danger);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.footer-disclaimer strong {
    color: var(--danger);
    display: block;
    margin-bottom: 0.25rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablets and below */
@media (max-width: 1200px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        padding: 0.75rem;
    }
    
    .nav-container {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .nav-logo span {
        display: none; /* Hide "Backtest Pro" text, keep only icon on very small screens */
    }
    
    .nav-auth {
        gap: 0.5rem;
    }
    
    .btn-outline,
    .btn-primary-small {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn-primary-large,
    .cta-buttons .btn-outline-large {
        width: 100%;
    }
    
    /* Features Section */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    /* Pricing Section */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Results Section */
    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 2rem;
    }
    
    /* How it Works */
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    /* Footer */
    .site-footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-disclaimer {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    /* Reduce base font size for compactness */
    html {
        font-size: 14px;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.75rem 0.5rem;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .nav-auth {
        gap: 0.375rem;
    }
    
    .btn-outline span,
    .btn-primary-small span {
        display: none; /* Hide text on very small screens */
    }
    
    /* Hero ultra compact */
    .hero-section {
        padding: 5rem 0.75rem 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    /* Feature cards */
    .feature-card {
        padding: 1rem;
    }
    
    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
    
    /* Pricing cards */
    .pricing-card {
        padding: 1.25rem;
    }
    
    .pricing-plan {
        font-size: 1rem;
    }
    
    .pricing-price {
        font-size: 1.75rem;
    }
    
    .pricing-features li {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    /* Buttons */
    .btn-primary-large,
    .btn-outline-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Results */
    .result-card {
        padding: 1rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    /* Language selector - make it more compact on mobile */
    .language-selector {
        display: flex;
        margin-left: 0.5rem;
    }
    
    .language-select {
        font-size: 0.75rem;
        padding: 0.25rem 0.375rem;
        border-radius: 6px;
        min-width: auto;
    }
    
    /* User menu - more compact on mobile */
    .user-menu-trigger {
        padding: 0.375rem 0.625rem !important;
        gap: 0.5rem !important;
    }
    
    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }
    
    .user-info {
        display: flex !important;
    }
    
    .user-name {
        font-size: 0.75rem !important;
    }
    
    .user-plan {
        font-size: 0.65rem !important;
    }
    
    .user-menu-trigger i {
        font-size: 0.7rem;
    }
    
    /* Form inputs prevent zoom on iOS */
    input, select, textarea, button {
        font-size: 16px !important;
    }
    
    /* Nav buttons more compact */
    .nav-auth {
        gap: 0.5rem;
    }
    
    .btn-outline,
    .btn-primary-small {
        padding: 0.375rem 0.625rem !important;
        font-size: 0.75rem !important;
    }
    
    .btn-outline i,
    .btn-primary-small i {
        font-size: 0.8rem;
    }
    
    /* Footer compact */
    .site-footer {
        padding: 1.5rem 0.75rem 1rem;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
    }
    
    .footer-links {
        font-size: 0.85rem;
    }

    /* ========== RESULTS VIEW OPTIMIZATIONS ========== */
    
    /* Results panel - ensure no overflow */
    .results-panel {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 0.75rem !important;
    }

    .results-panel * {
        max-width: 100%;
    }
    
    /* Metrics hero - ultra compact */
    .metrics-hero {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .metric-hero-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .metric-hero-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .metric-hero-value {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .metric-hero-label {
        font-size: 0.7rem;
        margin-bottom: 0.125rem;
    }

    .metric-hero-change {
        font-size: 0.75rem;
    }

    /* Charts - reduce height significantly */
    .charts-grid {
        gap: 0.75rem;
        margin-bottom: 1rem;
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }

    .chart-card {
        padding: 0.75rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .chart-header {
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
    }

    .chart-header h3 {
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .chart-controls {
        width: 100%;
        justify-content: center;
    }

    .chart-control-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .chart-container {
        max-height: 200px !important;
        height: 200px !important;
    }

    .chart-container canvas {
        max-height: 200px !important;
        height: 200px !important;
    }

    /* Detailed metrics */
    .metrics-detailed {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .metrics-section {
        margin-bottom: 0.75rem;
    }

    .metrics-section h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .metric-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .metric-label {
        font-size: 0.75rem;
    }

    .metric-value {
        font-size: 1.1rem;
    }

    /* Panel header */
    .panel-header {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }

    .panel-header h2 {
        font-size: 1.1rem;
    }

    .panel-header p {
        font-size: 0.75rem;
    }

    /* Header actions - more compact buttons */
    .header-actions {
        gap: 0.375rem;
    }

    .header-actions button {
        padding: 0.5rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    .header-actions button i {
        font-size: 0.85rem;
        margin-right: 0.25rem;
    }

    /* Trades table section */
    .trades-table-section {
        padding: 0.75rem;
        margin-top: 1rem;
    }

    .table-header h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .table-controls {
        gap: 0.375rem;
    }

    .search-input,
    .filter-select {
        padding: 0.5rem;
        font-size: 14px;
    }

    .trades-table {
        font-size: 0.65rem;
    }

    .trades-table th,
    .trades-table td {
        padding: 0.375rem 0.25rem;
    }

    .table-pagination {
        margin-top: 0.75rem;
        gap: 0.5rem;
    }

    .pagination-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    #pageInfo {
        font-size: 0.75rem;
    }

    /* Glass panels */
    .glass-panel {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    /* Results panel specific */
    .results-panel {
        padding: 0.75rem !important;
    }
}

/* Landscape orientation fixes */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        padding: 3rem 1rem 2rem;
    }
    
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
    }
}
