/* ============================================
   MASTERTRADE — Gold Trading Platform CSS
   ============================================ */

:root {
    --gold:       #D4AF37;
    --gold-light: #F5D76E;
    --gold-dark:  #A0892A;
    --bg:         #0A0B0D;
    --bg2:        #111318;
    --bg3:        #1A1D24;
    --bg4:        #222630;
    --border:     #2A2F3A;
    --text:       #E8EAF0;
    --text-muted: #8892A4;
    --text-dim:   #5A6478;
    --green:      #00C896;
    --red:        #FF4B6E;
    --blue:       #4B8BFF;
    --radius:     8px;
    --radius-lg:  12px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* ── Typography ── */
h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.7rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem;   font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.7; }

.gold        { color: var(--gold); }
.green       { color: var(--green); }
.red         { color: var(--red); }
.mono        { font-family: 'JetBrains Mono', monospace; }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }

/* ── Navbar ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 11, 13, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-icon { color: var(--gold); font-size: 1rem; }
.brand-name { letter-spacing: -0.02em; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    flex: 1;
}

.nav-links a {
    display: block;
    padding: 6px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-links a.active { color: var(--gold); background: rgba(212,175,55,0.1); }

.nav-live {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

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

/* ── Layout ── */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section      { padding: 60px 0; }
.section-sm   { padding: 40px 0; }
.section-lg   { padding: 80px 0; }

/* ── Hero ── */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(212,175,55,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(212,175,55,0.3);
    background: rgba(212,175,55,0.07);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--gold); }
.hero p  { font-size: 1.1rem; max-width: 600px; margin: 0 auto 36px; }

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

.stat-item { text-align: center; }
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Cards ── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card:hover { border-color: rgba(212,175,55,0.25); }

.card-gold {
    background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, var(--bg2) 100%);
    border-color: rgba(212,175,55,0.2);
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

.btn-gold {
    background: var(--gold);
    color: #000;
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.4);
}
.btn-outline:hover { background: rgba(212,175,55,0.1); }

/* ── Section header ── */
.section-header { margin-bottom: 40px; }
.section-header h2 { margin-bottom: 8px; }
.section-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

/* ── Signal Cards ── */
.signal-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.signal-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.signal-buy  { background: rgba(0,200,150,0.15); color: var(--green); border: 1px solid rgba(0,200,150,0.3); }
.signal-sell { background: rgba(255,75,110,0.15); color: var(--red);   border: 1px solid rgba(255,75,110,0.3); }
.signal-wait { background: rgba(90,100,120,0.2);  color: var(--text-muted); border: 1px solid var(--border); }

.signal-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
}

.signal-levels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.level-row { display: flex; justify-content: space-between; }
.level-label { color: var(--text-muted); }
.level-value { font-weight: 600; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(42,47,58,0.5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Code block ── */
.code-block {
    background: #0D0F14;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    overflow-x: auto;
    color: #ABB2BF;
}

.code-block .kw  { color: #C678DD; }
.code-block .fn  { color: #61AFEF; }
.code-block .str { color: #98C379; }
.code-block .num { color: #D19A66; }
.code-block .cm  { color: #5C6370; font-style: italic; }
.code-block .var { color: #E06C75; }

/* ── Progress bar ── */
.progress-bar {
    height: 4px;
    background: var(--bg4);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ── Alert box ── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.alert-warning { background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.25); color: var(--gold-light); }
.alert-info    { background: rgba(75,139,255,0.08); border: 1px solid rgba(75,139,255,0.25); color: #7AAEFF; }
.alert-success { background: rgba(0,200,150,0.08); border: 1px solid rgba(0,200,150,0.25); color: var(--green); }

/* ── Footer ── */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand p { font-size: 0.8rem; color: var(--text-dim); margin-left: 8px; }

.footer-links { display: flex; gap: 20px; flex: 1; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; }
.footer-links a:hover { color: var(--gold); }

.footer-disclaimer p { font-size: 0.75rem; color: var(--text-dim); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { gap: 24px; }
    h1 { font-size: 1.9rem; }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hero { padding: 48px 0 40px; }
    .section { padding: 40px 0; }
    h1 { font-size: 1.6rem; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .footer-container { flex-direction: column; align-items: flex-start; }
}
