/* ============================================================
   BDT AI — Chart Analyzer (Web Edition)
   style.css
   Color scheme: red (#FF0000) / green (#00FF00) / gold (#FFD700)
   ============================================================ */

:root {
    --red: #FF3B3B;
    --red-deep: #B30000;
    --green: #00E676;
    --green-deep: #00A34E;
    --gold: #FFD700;
    --gold-deep: #B8860B;

    --bg-body: #07090c;
    --bg-card: rgba(14, 18, 24, 0.78);
    --bg-card-solid: #0d1117;
    --border-gold: rgba(255, 215, 0, 0.22);
    --border-gold-hover: rgba(255, 215, 0, 0.55);
    --text-primary: #f2f4f8;
    --text-secondary: #a5adbd;
    --text-muted: #626b7d;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 12% 10%, rgba(255, 215, 0, 0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 20%, rgba(255, 59, 59, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 230, 118, 0.04) 0%, transparent 55%);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.90rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #0d1117;
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(255, 215, 0, 0.38); }
.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--border-gold);
}
.btn-outline:hover { border-color: var(--gold); background: rgba(255, 215, 0, 0.06); transform: translateY(-2px); }

.btn-generate {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.02rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--green), var(--green-deep));
    color: #05130a;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 28px rgba(0, 230, 118, 0.25);
}
.btn-generate:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(0, 230, 118, 0.35); }
.btn-generate:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(7, 9, 12, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-gold);
}
.nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; }
.nav-logo-img { height: 40px; width: auto; border-radius: 8px; }
.nav-logo-text {
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 15%, var(--gold) 55%, var(--gold-deep) 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 76px 24px 60px; text-align: center; }
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    padding: 6px 18px;
    border-radius: 20px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 18px;
}
.hero h1 .hl {
    background: linear-gradient(135deg, var(--gold) 0%, var(--red) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; align-items: center; }
.hero-stat strong { font-size: 1.6rem; font-weight: 800; color: var(--green); }
.hero-stat span { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* ============================================================
   SECTION SHELL
   ============================================================ */
.section-inner { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.section-title { font-size: 1.8rem; font-weight: 800; text-align: center; margin-bottom: 10px; }
.section-sub { color: var(--text-secondary); text-align: center; max-width: 560px; margin: 0 auto 36px; font-size: 0.95rem; }

/* ============================================================
   ANALYZER
   ============================================================ */
.analyzer-section { padding: 40px 0 70px; }
.analyzer-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.6rem 1.5rem;
    border: 2px dashed var(--border-gold);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.upload-drop:hover, .upload-drop.dragging { border-color: var(--gold); background: rgba(255, 215, 0, 0.03); }
.upload-icon { font-size: 2.2rem; margin-bottom: 10px; }
.upload-text { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; word-break: break-all; }
.upload-hint { font-size: 0.75rem; color: var(--text-muted); }
.upload-preview {
    display: none;
    max-width: 100%;
    max-height: 220px;
    margin-top: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-gold);
    object-fit: contain;
}
.upload-preview.active { display: block; }

.form-actions { margin-top: 20px; }
.form-error {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 59, 59, 0.08);
    border: 1px solid rgba(255, 59, 59, 0.25);
    color: var(--red);
    font-size: 0.85rem;
    text-align: center;
}
.form-error.active { display: block; }

#chartForm.collapsed { display: none; }

/* AD GATE */
.ad-gate { display: none; text-align: center; padding: 10px 0; }
.ad-gate.active { display: block; animation: fadeIn 0.3s ease-out; }
.ad-gate-label {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.ad-gate-box {
    min-height: 160px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-gold);
    background: rgba(255, 215, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.ad-placeholder-inner { text-align: center; color: var(--text-muted); }
.ad-placeholder-icon { font-size: 1.8rem; margin-bottom: 6px; }
.ad-placeholder-text { font-weight: 600; color: var(--gold); font-size: 0.9rem; }
.ad-placeholder-sub { font-size: 0.72rem; margin-top: 2px; }

/* ANALYZING STATE */
.analyzing-state { display: none; text-align: center; padding: 2.5rem 0; }
.analyzing-state.active { display: block; animation: fadeIn 0.3s ease-out; }
.spinner {
    width: 46px; height: 46px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, 0.15);
    border-top-color: var(--gold);
    animation: spin 0.9s linear infinite;
}
.analyzing-text { font-weight: 600; color: var(--text-primary); }
.analyzing-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.dots span { animation: dotFade 1.4s infinite; opacity: 0; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================================
   RESULT / REPORT CARD
   ============================================================ */
.result-wrap { display: none; margin-top: 22px; }
.result-wrap.active { display: block; animation: fadeIn 0.4s ease-out; }

.report-card {
    background: #05080c;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 1.6rem 1.7rem;
    box-shadow: inset 0 0 80px rgba(255, 215, 0, 0.02);
}
.report-card.signal-up { border-color: rgba(0, 230, 118, 0.35); }
.report-card.signal-down { border-color: rgba(255, 59, 59, 0.35); }

.report-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.report-title {
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.report-time { font-size: 0.72rem; color: var(--text-muted); font-family: 'Courier New', monospace; }

.report-hero { text-align: center; margin-bottom: 20px; }
.report-hero-signal { font-size: 2.1rem; font-weight: 900; letter-spacing: 1px; }
.signal-up .report-hero-signal { color: var(--green); }
.signal-down .report-hero-signal { color: var(--red); }
.signal-tie .report-hero-signal { color: var(--gold); }
.report-hero-conf { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }
.report-hero-trend { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

.report-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gold);
    margin: 18px 0 10px;
}
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.report-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.report-item span { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.report-item .yes { color: var(--green); font-weight: 600; }
.report-item .no { color: var(--red); font-weight: 600; }
.report-item .warn { color: var(--gold); font-weight: 600; }

.report-trade {
    margin-top: 14px;
    padding: 10px 14px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
}
.report-trade.yes { background: rgba(0, 230, 118, 0.08); border: 1px solid rgba(0, 230, 118, 0.25); color: var(--green); }
.report-trade.no { background: rgba(255, 59, 59, 0.08); border: 1px solid rgba(255, 59, 59, 0.25); color: var(--red); }
.report-trade.warn { background: rgba(255, 215, 0, 0.08); border: 1px solid rgba(255, 215, 0, 0.25); color: var(--gold); }

.model-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.model-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.8rem;
}
.model-name { color: var(--text-secondary); }
.model-row .yes { color: var(--green); font-size: 0.75rem; font-weight: 600; }
.model-row .no { color: var(--red); font-size: 0.75rem; font-weight: 600; }
.model-row .warn { color: var(--gold); font-size: 0.75rem; font-weight: 600; }

.report-logic {
    margin-top: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.report-logic span { color: var(--gold); font-weight: 600; margin-right: 6px; }

.report-footer {
    text-align: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-section { padding: 20px 0 80px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.feature-card {
    padding: 1.6rem 1.4rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-gold-hover); transform: translateY(-3px); }
.feature-icon { font-size: 1.8rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-secondary); font-size: 0.86rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--border-gold); padding: 40px 24px 30px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand p { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }
.footer-logo-img { height: 34px; }
.footer-logo-text {
    font-size: 1.15rem; font-weight: 800;
    background: linear-gradient(135deg, #fff 20%, var(--gold) 55%, var(--gold-deep) 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-links a {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); border-color: var(--border-gold-hover); background: rgba(255, 215, 0, 0.04); }
.footer-copy { width: 100%; text-align: center; font-size: 0.72rem; color: var(--text-muted); margin-top: 10px; }

/* FLOATING TELEGRAM */
.float-tg {
    position: fixed; bottom: 26px; right: 26px; z-index: 400;
    width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #0d1117; font-size: 1.7rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 28px rgba(255, 215, 0, 0.3);
    transition: var(--transition);
}
.float-tg:hover { transform: scale(1.08) translateY(-3px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dotFade { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
    .nav-links {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; background: var(--bg-card-solid);
        border-bottom: 1px solid var(--border-gold);
        padding: 16px 24px; gap: 14px;
        display: none;
    }
    .nav-links.active { display: flex; }
    .nav-toggle { display: flex; }
    .hero { padding: 50px 20px 40px; }
    .analyzer-card { padding: 1.4rem; }
    .model-votes { grid-template-columns: 1fr; }
}
