/* ============================================
   TradeAI - Modern Crypto Theme
   Dark Mode with Cyan/Purple Accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.7);
    --bg-elevated: rgba(30, 30, 45, 0.5);
    
    --accent-cyan: #00f0ff;
    --accent-purple: #a855f7;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-yellow: #facc15;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-cyan: rgba(0, 240, 255, 0.3);
    --glow-purple: rgba(168, 85, 247, 0.3);
    
    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, #0f0f1a 100%);
    
    /* Fonts */
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--gradient-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Animated Background */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -2;
    touch-action: none;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
    touch-action: none;
}

.bg-glow-1 {
    top: -200px;
    left: -200px;
    background: var(--accent-purple);
}

.bg-glow-2 {
    bottom: -200px;
    right: -200px;
    background: var(--accent-cyan);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { color: var(--text-secondary); }

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(0, 240, 255, 0.2);
    touch-action: manipulation;
    user-select: none;
    min-height: 44px;
    min-width: 44px;
    z-index: 10;
    pointer-events: auto !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: #000;
    box-shadow: 0 0 30px var(--glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 50px var(--glow-cyan), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
}

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

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--gradient-main);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-glow:hover::before {
    opacity: 0.5;
    filter: blur(20px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.navbar .btn {
    position: relative;
    z-index: 1001;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-main);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

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

.hero-content h1 {
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.hero-stat h4 {
    font-size: 2rem;
    color: var(--accent-cyan);
}

.hero-stat p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-visual img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 60px var(--glow-purple));
    animation: float 6s ease-in-out infinite;
}

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

/* Features Section */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    max-width: 600px;
    margin: 16px auto 0;
}

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

.feature-card {
    text-align: center;
    padding: 40px 24px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 12px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    padding: 32px;
}

.about-card h3 {
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

/* Steps Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card {
    text-align: center;
    padding: 32px 20px;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #000;
}

/* FAQ Section */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    padding: 24px;
}

.faq-item h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    margin-bottom: 16px;
}

.cta-section p {
    margin-bottom: 32px;
    font-size: 1.125rem;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    margin-bottom: 32px;
}

.wallet-info {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 32px;
}

.wallet-info label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-info .address {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    word-break: break-all;
    margin-top: 4px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    border-left: 3px solid var(--accent-cyan);
}

.sidebar-nav .logout {
    color: var(--accent-red);
    margin-top: 20px;
}

/* Main Content */
.main-content {
    grid-column: 2;
    padding: 32px;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.active {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
    width: 100%;
}

.stat-card {
    padding: 24px;
}

.stat-card label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 8px;
}

.stat-card .value.success {
    color: var(--accent-green);
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
}

/* Chart */
.chart-card {
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

.chart-card h3 {
    margin-bottom: 20px;
}

.chart-container {
    height: 280px;
    position: relative;
    width: 100%;
}

/* Logs */
.logs-card {
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.live-badge {
    font-size: 0.75rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.logs-container {
    height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.log-entry {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: background 0.2s;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.02);
    margin: 0 -8px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-muted);
    flex-shrink: 0;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    min-width: 70px;
}

.log-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.log-msg {
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.5;
}

.log-msg.success {
    color: var(--accent-green);
}

.log-msg.error {
    color: var(--accent-red);
}

.log-msg.warning {
    color: var(--accent-yellow);
}

.log-msg.trade {
    color: var(--accent-cyan);
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bot Controls */
.bot-card {
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

.bot-card h3 {
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* Withdraw Card */
.withdraw-card {
    padding: 24px;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.withdraw-card h3 {
    margin-bottom: 20px;
}

.withdraw-status {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Subscription Panel */
.sub-card {
    padding: 24px;
    margin-top: 24px;
    border: 1px solid var(--accent-purple);
    width: 100%;
    box-sizing: border-box;
}

.sub-card h3 {
    margin-bottom: 12px;
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { order: -1; margin-bottom: 40px; }
    
    .about-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Dashboard responsive handled in dashboard-extra.css */
}

@media (max-width: 768px) {
    .steps-grid { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .steps-grid { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
}

/* Mobile button fixes for MetaMask browser */
@media (max-width: 1024px) {
    .btn,
    button,
    input[type="button"],
    input[type="submit"],
    a.btn {
        -webkit-tap-highlight-color: rgba(0, 240, 255, 0.3);
        touch-action: manipulation;
        cursor: pointer;
        pointer-events: auto !important;
        position: relative;
        z-index: 100;
        -webkit-user-select: none;
        user-select: none;
        min-height: 48px;
        min-width: 48px;
    }
    
    .btn:active,
    button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Ensure buttons are not blocked by other elements */
    .hero-buttons,
    .navbar .container,
    .cta-section {
        position: relative;
        z-index: 10;
    }
    
    /* Prevent background elements from blocking clicks */
    .hero,
    .section {
        position: relative;
        z-index: 1;
    }
}

/* ============================================
   Support Section
   ============================================ */

.support-card {
    text-align: center;
    padding: 60px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.support-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.support-card h2 {
    margin-bottom: 16px;
}

.support-card > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1.1rem;
}

.support-btn .telegram-icon {
    font-size: 1.3rem;
}

.support-hours {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .support-card {
        padding: 40px 24px;
    }
    
    .support-icon {
        font-size: 3rem;
    }
    
    .support-card > p {
        font-size: 1rem;
    }
}

