/* ============================================
   SapCod - Auto Trading Strategy Page Styles
   Ultra Premium Design with Financial Graphics
   ============================================ */

/* ===== Hero Section ===== */
.at-hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    padding: 150px 0 80px; background: #fafbfc; overflow: hidden; isolation: isolate;
}
[data-theme="dark"] .at-hero { background: #060610; }

.at-hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
#atCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.at-hero-orb {
    position: absolute; border-radius: 50%; filter: blur(120px);
    opacity: 0.06; animation: atOrbFloat 12s ease-in-out infinite;
}
.at-hero-orb.at-orb-1 { width: 500px; height: 500px; background: #8b5cf6; top: -150px; right: -100px; }
.at-hero-orb.at-orb-2 { width: 400px; height: 400px; background: #f59e0b; bottom: -100px; left: -80px; animation-delay: 5s; }
@keyframes atOrbFloat { 0%,100%{transform:translate(0,0)scale(1)} 50%{transform:translate(40px,-30px)scale(1.1)} }

.at-hero-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(139,92,246,0.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(139,92,246,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at 50% 40%, black 35%, transparent 70%);
}

.at-candlestick-bg {
    position: absolute; inset: 0; opacity: 0.02;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(139,92,246,0.3) 19px, rgba(139,92,246,0.3) 20px);
    background-size: 30px 20px;
}

.at-hero-content { position: relative; z-index: 1; text-align: center; max-width: 850px; margin: 0 auto; }

.at-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 50px; margin-bottom: 24px;
    font-size: 0.8rem; font-weight: 600; color: #8b5cf6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    animation: atfadeUp 0.6s ease both;
}
[data-theme="dark"] .at-hero-badge { background: #1a1a2e; border-color: #2a2a4a; }

.badge-pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: atPulse 2s infinite; }
@keyframes atPulse { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,0.4)} 50%{box-shadow:0 0 0 12px rgba(34,197,94,0)} }

.at-hero-content h1 {
    font-size: 3.5rem; font-weight: 900; line-height: 1.12;
    color: #0f172a; margin-bottom: 18px; letter-spacing: -1.5px;
    animation: atfadeUp 0.6s ease 0.1s both;
}
[data-theme="dark"] .at-hero-content h1 { color: #f1f5f9; }

.at-gradient {
    background: linear-gradient(90deg, #8b5cf6, #f59e0b, #22c55e, #8b5cf6);
    background-size: 300% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: atGradientFlow 3s ease infinite;
}
@keyframes atGradientFlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

.at-hero-content p {
    font-size: 1.1rem; color: #64748b; line-height: 1.7;
    max-width: 600px; margin: 0 auto 30px;
    animation: atfadeUp 0.6s ease 0.2s both;
}
[data-theme="dark"] .at-hero-content p { color: #94a3b8; }

.at-hero-actions {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
    animation: atfadeUp 0.6s ease 0.3s both;
}

.at-btn-primary {
    padding: 16px 32px; background: #8b5cf6; color: #fff;
    border-radius: 14px; text-decoration: none; font-weight: 700;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.3s; box-shadow: 0 8px 30px rgba(139,92,246,0.25);
}
.at-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(139,92,246,0.4); }

.at-btn-outline {
    padding: 16px 30px; background: #fff; color: #8b5cf6;
    border: 2px solid #e2e8f0; border-radius: 14px;
    text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s;
}
[data-theme="dark"] .at-btn-outline { background: #1a1a2e; border-color: #2a2a4a; color: #a78bfa; }
.at-btn-outline:hover { border-color: #8b5cf6; }

.at-hero-stats {
    display: flex; gap: 30px; justify-content: center; margin-top: 40px;
    animation: atfadeUp 0.6s ease 0.4s both;
}
.at-stat { text-align: center; }
.at-stat-icon { font-size: 1.5rem; margin-bottom: 4px; }
.at-stat-val { font-size: 1.6rem; font-weight: 800; color: #8b5cf6; }
.at-stat-lbl { font-size: 0.75rem; color: #94a3b8; font-weight: 500; }

@keyframes atfadeUp { from{opacity:0;transform:translateY(25px)} to{opacity:1;transform:translateY(0)} }

/* ===== Sections Common ===== */
.at-services, .at-tech, .at-process, .at-features, .at-cta { padding: 100px 0; }
.at-services, .at-process { background: #fff; }
[data-theme="dark"] .at-services, [data-theme="dark"] .at-process { background: #0a0a1a; }
.at-tech, .at-features { background: #f8fafc; }
[data-theme="dark"] .at-tech, [data-theme="dark"] .at-features { background: #0e0e22; }

.at-section-header { text-align: center; margin-bottom: 60px; }
.at-chip {
    display: inline-block; padding: 8px 18px;
    background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.12);
    border-radius: 50px; font-size: 0.78rem; font-weight: 700;
    color: #8b5cf6; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px;
}
.at-section-header h2 { font-size: 2.6rem; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
[data-theme="dark"] .at-section-header h2 { color: #e8e8f0; }
.at-section-header h2 .highlight { color: #8b5cf6; }
.at-section-header p { color: #888; font-size: 1rem; }

/* ===== Services Showcase ===== */
.at-services-showcase { display: flex; flex-direction: column; gap: 80px; }
.at-service-block { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.at-service-block.reverse { direction: rtl; }
.at-service-block.reverse .at-service-info { direction: ltr; }
.at-service-visual { position: relative; display: flex; justify-content: center; }

/* Chart Mockup */
.at-chart-mockup {
    width: 100%; max-width: 440px; background: #fff; border-radius: 16px;
    overflow: hidden; border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06); animation: atFloat 5s ease-in-out infinite;
}
[data-theme="dark"] .at-chart-mockup { background: #1a1a30; border-color: #2a2a4a; }
@keyframes atFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

.chart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 0.82rem; color: #0f172a;
}
[data-theme="dark"] .chart-header { background: #1e293b; color: #e0e0e0; }
.chart-live { color: #ef4444; font-size: 0.7rem; animation: atPulse 2s infinite; }
.chart-body { padding: 16px; }
.chart-price-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.price-symbol { font-size: 0.78rem; color: #64748b; font-weight: 600; }
.price-value { font-size: 1.4rem; font-weight: 800; color: #0f172a; }
.price-change { font-size: 0.78rem; font-weight: 600; }
.price-value.up, .price-change.up { color: #22c55e; }
.chart-canvas { margin-bottom: 12px; }
.chart-svg { width: 100%; height: auto; }
.chart-line { stroke-dasharray: 400; animation: chartDraw 2s ease forwards; }
@keyframes chartDraw { from{stroke-dashoffset:400} to{stroke-dashoffset:0} }

.chart-indicators { display: flex; gap: 10px; }
.indicator { flex: 1; }
.ind-label { font-size: 0.6rem; color: #94a3b8; text-transform: uppercase; }
.ind-value { font-size: 0.8rem; font-weight: 700; color: #0f172a; }
.ind-value.up { color: #22c55e; }
.ind-bar { height: 4px; background: #e2e8f0; border-radius: 2px; margin-top: 4px; }
.ind-fill { height: 100%; background: #8b5cf6; border-radius: 2px; }

/* Backtest Mockup */
.at-backtest-mockup {
    width: 100%; max-width: 440px; background: #fff; border-radius: 16px;
    overflow: hidden; border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06); animation: atFloat 5s ease-in-out infinite 1s;
}
[data-theme="dark"] .at-backtest-mockup { background: #1a1a30; border-color: #2a2a4a; }
.bt-header {
    padding: 14px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 0.85rem; color: #0f172a;
}
.bt-stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 14px; }
.bt-stat { text-align: center; padding: 10px; background: #f8fafc; border-radius: 10px; }
.bt-stat-label { font-size: 0.6rem; color: #94a3b8; text-transform: uppercase; margin-bottom: 3px; }
.bt-stat-value { font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.bt-stat-value.up { color: #22c55e; }
.bt-equity-curve { padding: 0 14px 10px; }
.bt-curve-label { font-size: 0.65rem; color: #94a3b8; margin-bottom: 8px; }
.bt-svg { width: 100%; height: auto; }
.bt-line { stroke-dasharray: 400; animation: chartDraw 2s ease forwards; }
.bt-metrics { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid #e2e8f0; }
.bt-metric { flex: 1; font-size: 0.68rem; color: #64748b; text-align: center; }
.bt-metric strong { color: #0f172a; }

/* Risk Mockup */
.at-risk-mockup {
    width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
    overflow: hidden; border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06); animation: atFloat 5s ease-in-out infinite 2s;
}
[data-theme="dark"] .at-risk-mockup { background: #1a1a30; border-color: #2a2a4a; }
.risk-header {
    padding: 14px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 0.85rem; color: #0f172a;
}
.risk-gauges { display: flex; gap: 16px; padding: 16px; align-items: center; }
.risk-gauge { text-align: center; }
.gauge-circle { position: relative; width: 100px; height: 100px; }
.gauge-svg { width: 100%; height: 100%; }
.gauge-fill { transition: stroke-dashoffset 1.5s ease; }
.gauge-value { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 1rem; font-weight: 800; color: #0f172a; }
.gauge-label { font-size: 0.65rem; color: #94a3b8; margin-top: 4px; }
.risk-stats { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.risk-stat { display: flex; justify-content: space-between; padding: 8px 10px; background: #f8fafc; border-radius: 8px; font-size: 0.72rem; }
.rs-label { color: #64748b; }
.rs-value { font-weight: 700; color: #0f172a; }
.rs-value.up { color: #22c55e; }

/* Live Trading Mockup */
.at-live-mockup {
    width: 100%; max-width: 420px; background: #fff; border-radius: 16px;
    overflow: hidden; border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06); animation: atFloat 5s ease-in-out infinite 0.5s;
}
[data-theme="dark"] .at-live-mockup { background: #1a1a30; border-color: #2a2a4a; }
.live-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 0.85rem; color: #0f172a;
}
.live-status.running { color: #22c55e; font-size: 0.72rem; }
.live-trades { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.live-trade {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    background: #f8fafc; border-radius: 8px; font-size: 0.72rem;
}
.trade-type { padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 0.65rem; }
.live-trade.buy .trade-type { background: rgba(34,197,94,0.1); color: #22c55e; }
.live-trade.sell .trade-type { background: rgba(239,68,68,0.1); color: #ef4444; }
.trade-symbol { font-weight: 600; color: #0f172a; flex: 1; }
.trade-price { color: #64748b; }
.trade-time { color: #94a3b8; font-size: 0.65rem; }
.live-pnl {
    display: flex; justify-content: space-between; padding: 12px 14px;
    border-top: 1px solid #e2e8f0; font-size: 0.82rem; font-weight: 600;
}
.pnl-value.up { color: #22c55e; font-weight: 800; }

/* Floating Tags */
.at-float-tag {
    position: absolute; padding: 8px 16px; background: #fff;
    border-radius: 10px; font-size: 0.72rem; font-weight: 700;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06); animation: atTagFloat 3s ease-in-out infinite;
}
[data-theme="dark"] .at-float-tag { background: #1e293b; color: #e0e0e0; }
.at-float-tag.tag-top { top: -10px; right: -10px; color: #8b5cf6; }
.at-float-tag.tag-bottom { bottom: -10px; left: -10px; color: #f59e0b; animation-delay: 1.5s; }
.at-float-tag.green-tag { color: #22c55e; }
.at-float-tag.purple-tag { color: #8b5cf6; }
@keyframes atTagFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* Service Info */
.at-service-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 16px;
}
.icon-purple{background:rgba(139,92,246,0.08);color:#8b5cf6}
.icon-green{background:rgba(34,197,94,0.08);color:#22c55e}
.icon-orange{background:rgba(245,158,11,0.08);color:#f59e0b}
.icon-teal{background:rgba(20,184,166,0.08);color:#14b8a6}

.at-service-info h3 { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
[data-theme="dark"] .at-service-info h3 { color: #e0e0e0; }
.at-service-info p { font-size: 0.95rem; color: #64748b; line-height: 1.7; margin-bottom: 16px; }
[data-theme="dark"] .at-service-info p { color: #94a3b8; }

.at-feature-list { list-style: none; padding: 0; }
.at-feature-list li {
    font-size: 0.88rem; color: #475569; padding: 6px 0;
    display: flex; align-items: flex-start; gap: 10px;
}
[data-theme="dark"] .at-feature-list li { color: #94a3b8; }
.at-feature-list li i { color: #22c55e; margin-top: 3px; font-size: 0.75rem; }

/* ===== Tech Showcase ===== */
.at-tech-showcase { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; }
.at-tech-category {
    background: #fff; border-radius: 20px; padding: 35px 24px;
    text-align: center; border: 1px solid #e2e8f0; transition: all 0.3s;
}
[data-theme="dark"] .at-tech-category { background: #1a1a30; border-color: #2a2a4a; }
.at-tech-category:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.06); }
.at-tech-icon-wrap {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(139,92,246,0.06); color: #8b5cf6;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin: 0 auto 16px;
}
.at-tech-category h4 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 20px; }
.at-tech-orbit { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tech-bubble {
    padding: 8px 16px; background: #f1f5f9; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; color: #475569;
    transition: all 0.3s; animation: atBubbleFloat 3s ease infinite;
    animation-delay: calc(var(--i) * 0.3s);
}
[data-theme="dark"] .tech-bubble { background: #0f0f23; color: #94a3b8; }
.tech-bubble:hover { background: #8b5cf6; color: #fff; transform: scale(1.05); }
@keyframes atBubbleFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

/* ===== Features ===== */
.at-features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.at-feature-card {
    background: #fff; border-radius: 18px; padding: 30px 24px;
    text-align: center; border: 1px solid #e2e8f0; transition: all 0.3s;
}
[data-theme="dark"] .at-feature-card { background: #1a1a30; border-color: #2a2a4a; }
.at-feature-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
.at-feature-icon {
    width: 55px; height: 55px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin: 0 auto 14px;
}
.af-purple{background:rgba(139,92,246,0.08);color:#8b5cf6}
.af-green{background:rgba(34,197,94,0.08);color:#22c55e}
.af-blue{background:rgba(0,102,255,0.08);color:#0066ff}
.af-orange{background:rgba(245,158,11,0.08);color:#f59e0b}
.af-teal{background:rgba(20,184,166,0.08);color:#14b8a6}
.af-rose{background:rgba(244,63,94,0.08);color:#f43f5e}
.at-feature-card h4 { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.at-feature-card p { font-size: 0.85rem; color: #64748b; line-height: 1.6; }

/* ===== Process ===== */
.at-process-flow {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 0; max-width: 1000px; margin: 0 auto; flex-wrap: wrap;
}
.at-process-card {
    text-align: center; width: 180px; padding: 25px 15px;
    background: #fff; border-radius: 20px; border: 1px solid #e2e8f0;
    transition: all 0.3s; position: relative;
}
[data-theme="dark"] .at-process-card { background: #1a1a30; border-color: #2a2a4a; }
.at-process-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.06); }
.at-process-num { font-size: 2.5rem; font-weight: 900; color: rgba(139,92,246,0.08); position: absolute; top: 10px; left: 15px; line-height: 1; }
.at-process-icon-wrap {
    width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin: 0 auto 12px;
}
.ap-purple{background:rgba(139,92,246,0.1);color:#8b5cf6}
.ap-green{background:rgba(34,197,94,0.1);color:#22c55e}
.ap-blue{background:rgba(0,102,255,0.1);color:#0066ff}
.ap-orange{background:rgba(245,158,11,0.1);color:#f59e0b}
.at-process-card h4 { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.at-process-card p { font-size: 0.8rem; color: #64748b; line-height: 1.5; margin-bottom: 8px; }
.at-process-tag { font-size: 0.65rem; padding: 4px 10px; background: #f1f5f9; border-radius: 6px; color: #8b5cf6; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.at-process-connector { display: flex; flex-direction: column; align-items: center; padding: 0 10px; margin-top: 50px; }
.apc-line { width: 40px; height: 2px; background: linear-gradient(90deg, #8b5cf6, #f59e0b); opacity: 0.3; }
.apc-arrow { color: #8b5cf6; font-size: 0.7rem; margin-top: 2px; }

/* ===== CTA ===== */
.at-cta-wrapper {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-radius: 28px; padding: 60px 40px; text-align: center;
    color: #fff; position: relative; overflow: hidden;
}
.at-cta-glow { position: absolute; width: 300px; height: 300px; background: rgba(255,255,255,0.05); border-radius: 50%; top: -50px; right: -50px; filter: blur(50px); }
.at-cta-wrapper h2 { font-size: 2.4rem; font-weight: 800; margin-bottom: 10px; position: relative; }
.at-cta-wrapper p { font-size: 1rem; opacity: 0.9; margin-bottom: 28px; position: relative; }
.at-cta-wrapper .at-gradient { background: linear-gradient(90deg, #fff, #cbd5e1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.at-cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.at-btn-white { padding: 16px 30px; background: #fff; color: #8b5cf6; border-radius: 14px; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s; }
.at-btn-white:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .at-service-block, .at-service-block.reverse { grid-template-columns: 1fr; direction: ltr; gap: 40px; }
    .at-service-visual { order: -1; max-width: 400px; margin: 0 auto; }
    .at-tech-showcase, .at-features-grid { grid-template-columns: repeat(2,1fr); }
    .at-hero-content h1 { font-size: 2.6rem; }
}
@media (max-width: 768px) {
    .at-hero-content h1 { font-size: 2rem; }
    .at-tech-showcase, .at-features-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .at-process-flow { flex-direction: column; align-items: center; gap: 20px; }
    .at-process-card { width: 100%; max-width: 280px; }
    .at-process-connector { display: none; }
    .at-hero-stats { gap: 20px; flex-wrap: wrap; }
    .at-float-tag { display: none; }
    .at-section-header h2 { font-size: 2rem; }
    .at-cta-wrapper { padding: 40px 20px; }
    .at-cta-wrapper h2 { font-size: 1.6rem; }
    .risk-gauges { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
    .at-hero-content h1 { font-size: 1.7rem; }
    .at-hero-actions { flex-direction: column; align-items: center; }
    .at-btn-primary, .at-btn-outline { width: 100%; justify-content: center; }
}