/* === CSS Custom Properties (set by JS from brokers.json) === */
:root {
    --bg1: #0a1f1a;
    --bg2: #0f2922;
    --primary: #10b981;
    --primary-dark: #059669;
    --accent: #34d399;
    --feature: #4ade80;
    --stars: #fbbf24;
    --text-on-primary: #ffffff;
}

/* === Reset === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg1) 100%);
    min-height: 100vh;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s;
}
body.loaded { opacity: 1; }

/* === Header === */
.header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-border, rgba(16, 185, 129, 0.2));
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    font-weight: bold;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--primary); }

#lang-btn {
    background: rgba(255, 196, 0, 0.15);
    border: 1px solid rgba(255, 196, 0, 0.4);
    color: #ffc400;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* === Back Button === */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}
.back-btn:hover { transform: translateX(-5px); }

/* === Hero Section === */
.hero {
    background: var(--hero-bg, rgba(255, 255, 255, 0.03));
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    border: 1px solid var(--primary-border, rgba(16, 185, 129, 0.2));
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.broker-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    font-weight: bold;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.2;
}

.broker-info h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.stars {
    color: var(--stars);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.hero-center { text-align: center; }

.hero-amount {
    font-size: 3.5rem;
    font-weight: 700;
}
.hero-amount.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-amount.solid-text {
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary-glow, rgba(16, 185, 129, 0.5));
}

.hero-sub {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--feature);
    font-weight: 500;
}
.feature-item svg { width: 20px; height: 20px; }

/* === Page Title === */
.page-title { text-align: center; margin-bottom: 2rem; }
.page-title h2 {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* === Steps Container === */
.steps-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* === Step Card === */
.step-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-border, rgba(16, 185, 129, 0.2));
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--step-icon-bg, rgba(16, 185, 129, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--step-icon-border, rgba(16, 185, 129, 0.3));
}
.step-icon svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.step-number {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* === Instruction Items === */
.instruction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.instruction-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    position: relative;
}

.instruction-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.instruction-content { flex: 1; }
.instruction-content p { line-height: 1.6; color: #e0e0e0; }
.instruction-content .highlight { color: var(--accent); font-weight: 600; }
.instruction-content .link { color: #60a5fa; word-break: break-all; text-decoration: none; }
.instruction-content a.link:hover { text-decoration: underline; }
.instruction-content .warning { color: #f87171; font-size: 0.9rem; margin-top: 0.5rem; }
.instruction-content .success { color: #4ade80; font-size: 0.9rem; margin-top: 0.5rem; }
.instruction-content .info { color: #a0a0a0; font-size: 0.9rem; margin-top: 0.5rem; }

/* === Copy Button === */
.copy-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--copy-btn-bg, rgba(16, 185, 129, 0.1));
    border: 1px solid var(--copy-btn-border, rgba(16, 185, 129, 0.3));
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.copy-btn:hover { background: var(--copy-btn-hover, rgba(16, 185, 129, 0.2)); }
.copy-btn svg { width: 18px; height: 18px; color: var(--primary); }
.copy-btn.copied { background: rgba(74, 222, 128, 0.2); border-color: rgba(74, 222, 128, 0.3); }
.copy-btn.copied svg { color: #4ade80; }

.copy-btn.full-width {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    padding: 0.75rem;
    margin-top: 1rem;
}

/* === Email Template === */
.email-template {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--primary-border, rgba(16, 185, 129, 0.2));
}
.email-template pre {
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}
.email-template .ib-number { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.email-template .editable { color: #fbbf24; font-weight: bold; }

/* === IB Badge === */
.ib-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--copy-btn-bg, rgba(16, 185, 129, 0.1));
    border: 2px solid var(--step-icon-border, rgba(16, 185, 129, 0.3));
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
}
.ib-badge .label { color: rgba(255, 255, 255, 0.7); font-weight: 500; }
.ib-badge .value { color: var(--accent); font-size: 1.1rem; font-weight: 700; }

/* === Submit / Action Button === */
.submit-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow, rgba(16, 185, 129, 0.3));
}

/* === Warning Text === */
.warning-text {
    color: #fbbf24;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* === Info Box === */
.info-box {
    background: var(--copy-btn-bg, rgba(16, 185, 129, 0.1));
    border: 1px solid var(--copy-btn-border, rgba(16, 185, 129, 0.3));
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.info-box p { color: var(--accent); font-weight: 500; }

/* === Contact Box === */
.contact-box {
    text-align: center;
    padding: 2rem;
    background: var(--copy-btn-bg, rgba(16, 185, 129, 0.1));
    border: 1px solid var(--primary-border, rgba(16, 185, 129, 0.2));
    border-radius: 16px;
}
.contact-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px var(--primary-glow, rgba(16, 185, 129, 0.3));
}
.contact-box h3 { color: var(--accent); font-size: 1.25rem; margin-bottom: 0.75rem; }
.contact-box p { color: rgba(255, 255, 255, 0.7); margin-bottom: 1.5rem; }

/* === IB Info Panel === */
.ib-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.ib-info h4 { color: var(--accent); margin-bottom: 1rem; }
.ib-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.ib-info-row:last-child { margin-bottom: 0; }
.ib-info-label { color: rgba(255, 255, 255, 0.6); }
.ib-info-value { color: #fff; font-weight: 600; }

/* === Note Card (Exness) === */
.note-card {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.note-card h4 { color: #f87171; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.note-card p { color: #e0e0e0; line-height: 1.6; font-size: 0.95rem; }
.note-card p + p { margin-top: 0.5rem; }
.note-card .highlight { color: var(--primary); font-weight: 600; }

.register-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow, rgba(16, 185, 129, 0.3));
}

/* === Chatbot Sub-Items (Exness step 3) === */
.chatbot-sub-item {
    background: rgba(255, 196, 0, 0.05);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    border-left: 3px solid rgba(255, 196, 0, 0.4);
    position: relative;
}
.chatbot-sub-item p { font-size: 0.9rem; }

/* === Status Badges (Exness) === */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-pending { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.status-success { background: rgba(74, 222, 128, 0.2); color: #4ade80; }

/* === Footer === */
.footer {
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    border-top: 1px solid var(--primary-border, rgba(16, 185, 129, 0.1));
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-on-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 600;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* === Responsive === */
@media (max-width: 900px) {
    .steps-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { flex-direction: column; text-align: center; }
    .hero-left { flex-direction: column; }
    .hero-right { align-items: center; }
    .hero-amount { font-size: 2.5rem; }
    .container { padding: 1rem; }
    .step-card { padding: 1.5rem; }
    .instruction-item { flex-direction: column; padding-right: 1rem; }
    .copy-btn:not(.full-width) { position: static; transform: none; margin-top: 0.5rem; align-self: flex-end; }
    .ib-badge { flex-direction: column; text-align: center; }
}
