/* =========================================================
   ForexPhantom - Clean Unified Stylesheet (Dark / SaaS)
   COMPLETE FILE (Corrected)
   FIXES INCLUDED:
   - Seamless breathing background (no visible repeat seam)
   - Solid panel tokens for cards (prevents background bleed-through)
   - Fix badge class collision (.fx-pricing-badge)
   - FAQ +/- works ONLY on: <details class="fx-faq-item fx-toggle"> inside .fx-faq
   - Orders and other pages can use <div class="fx-faq-item"> and still get “card” styling
   - No +/- leakage onto Orders or other pages
   - Spacing between cards in .fx-faq-list works for Orders + FAQs
   ========================================================= */

/* -------------------------
   Theme Tokens
-------------------------- */
:root {
    --bg-main: #050910;

    /* Translucent panels (use sparingly where background bleed is OK) */
    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-panel-strong: rgba(255, 255, 255, 0.05);

    /* Solid panels (use for cards/boxes so moving background doesn't show through) */
    --bg-panel-solid: #0f1722;

    --accent: #00b36b;            /* money green */
    --accent-soft: rgba(0, 179, 107, 0.14);

    --text-main: #f5f7ff;
    --text-muted: #9ba3c1;

    --border-subtle: #1b2133;

    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.45);

    --radius-lg: 18px;
    --radius-md: 14px;

    --transition-fast: 0.2s ease-out;

    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --container-width: 1100px;
    --prose-width: 880px;
}

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

html {
    height: 100%;
    overflow-y: scroll; /* Keep layout stable across pages */
}

body {
    height: 100%;
    font-family: var(--font-main);
    background: var(--bg-main); /* base fallback */
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Smooth animated background - no visible seam */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background: radial-gradient(
        1200px 800px at 50% 0%,
        rgba(21, 27, 47, 0.85) 0%,
        rgba(5, 9, 16, 0.98) 55%,
        rgba(2, 3, 8, 1) 100%
    );
    background-size: 100% 240%;
    background-position: 50% 0%;

    animation: fxpBgBreath 16s ease-in-out infinite alternate;
}

@keyframes fxpBgBreath {
    0%   { background-position: 50% 0%; }
    100% { background-position: 50% 100%; }
}

a { color: inherit; }

/* -------------------------
   Layout
-------------------------- */
.fx-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.fx-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3.0rem 1.5rem 2.75rem;
}

/* -------------------------
   Header / Navigation
-------------------------- */
.fx-header {
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    background: linear-gradient(
        to right,
        rgba(5, 9, 16, 0.96),
        rgba(5, 9, 16, 0.90)
    );
    position: sticky;
    top: 0;
    z-index: 10;
}

.fx-header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fx-logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    color: inherit;
}

.fx-logo-main {
    font-weight: 750;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    font-size: 1.05rem;
}

.fx-logo-accent {
    color: var(--accent);
}

.fx-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.fx-headline-nowrap {
    white-space: nowrap;
    display: inline-block;
}

.fx-nav-link {
    text-decoration: none;
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.fx-nav-link:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.fx-nav-link.active {
    color: var(--bg-main);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(0, 179, 107, 0.35);
}

/* ================================
   Mobile Burger Nav
   ================================ */
.fx-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.fx-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 179, 107, 0.25);
}

.fx-burger {
    width: 18px;
    height: 2px;
    background: var(--text-main);
    position: relative;
    border-radius: 2px;
}

.fx-burger::before,
.fx-burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
}

.fx-burger::before { top: -6px; }
.fx-burger::after  { top:  6px; }

@media (max-width: 820px) {
    .fx-nav-toggle { display: inline-flex; }
    .fx-header-inner { position: relative; }

    .fx-nav {
        display: none;
        position: absolute;
        right: 1.25rem;
        top: calc(100% + 10px);
        width: min(320px, calc(100vw - 2.5rem));
        padding: 0.75rem;
        border-radius: 16px;
        border: 1px solid var(--border-subtle);
        background: rgba(5, 9, 16, 0.98);
        box-shadow: var(--shadow-soft);
        flex-direction: column;
        gap: 0.35rem;
        align-items: stretch;
        z-index: 100;
    }

    .fx-nav.is-open { display: flex; }

    .fx-nav-link {
        padding: 0.65rem 0.85rem;
        border-radius: 12px;
    }
}

/* -------------------------
   Prose (Professional page typography)
-------------------------- */
.fx-prose {
    max-width: var(--prose-width);
    margin: 0 auto;
}

.fx-prose h1 {
    font-size: clamp(2.0rem, 2.6vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-transform: none;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    max-width: 22ch;
}

.fx-prose .subtitle {
    font-size: 1.12rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 70ch;
    margin-bottom: 1.2rem;
}

.fx-prose p {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 1.1rem 0;
}

.fx-prose h2 {
    margin-top: 2.1rem;
    margin-bottom: 0.85rem;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.fx-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 1.6rem 0;
}

/* -------------------------
   Panels / Media placeholders
-------------------------- */
.fx-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.fx-panel--media {
    display: grid;
    place-items: center;
    min-height: 260px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02)
    );
}

.fx-panel--media span {
    color: var(--text-muted);
    opacity: 0.85;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Two column layout for screenshot/graph sections */
.fx-grid-2 {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.3rem;
    align-items: start;
}

/* -------------------------
   CTA Buttons (single system)
-------------------------- */
.fx-cta-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.1rem 0 0.2rem;
}

.fx-cta-primary {
    background: var(--accent);
    color: var(--bg-main);
    border-radius: 999px;
    padding: 0.72rem 1.25rem;
    text-decoration: none;
    font-weight: 750;
    box-shadow: 0 10px 22px rgba(0, 179, 107, 0.22);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background 0.2s ease-out;
}

.fx-cta-primary:hover {
    transform: translateY(-1px);
    background: #00a162;
    box-shadow: 0 14px 28px rgba(0, 179, 107, 0.32);
}

.fx-cta-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 0.72rem 1.25rem;
    text-decoration: none;
    font-weight: 650;
    transition: transform 0.2s ease-out, background 0.2s ease-out;
}

.fx-cta-secondary:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.04);
}

/* -------------------------
   Generic pill badge (safe everywhere)
-------------------------- */
.fx-badge {
    position: static; /* IMPORTANT: not top-right */
    font-size: 0.78rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    white-space: nowrap;
}

/* -------------------------
   Feature Cards (Homepage / general)
-------------------------- */
.fx-feature-grid {
    max-width: var(--prose-width);
    margin: 1.4rem auto 1.6rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.fx-feature-card {
    background: var(--bg-panel-solid);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.15rem 1.05rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease-out, border-color 0.2s ease-out;
}

.fx-feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 179, 107, 0.22);
}

.fx-feature-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.fx-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(0, 179, 107, 0.12);
    border: 1px solid rgba(0, 179, 107, 0.22);
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.fx-feature-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.fx-feature-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.fx-feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

/* -------------------------
   Lists
-------------------------- */
.fx-list {
    margin: 1rem 0 1.5rem 0;
    padding-left: 1.4rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.fx-list li { margin-bottom: 0.6rem; }

/* =========================================================
   DETAILS/SUMMARY BEHAVIOR
   - Remove default disclosure triangle everywhere
   - Do NOT show +/- by default
   - FAQ +/- is added separately (scoped)
   ========================================================= */
details > summary::-webkit-details-marker { display: none; }
details > summary { list-style: none; }
details > summary::after { content: none; }

/* Also guard against invalid <summary> usage (e.g. in older markup) */
summary { list-style: none; }
summary::after { content: none; }

/* -------------------------
   FAQ Styles
-------------------------- */
.fx-faq {
    max-width: 900px;
    margin: 0 auto 2.5rem;
}

.fx-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0; /* we use margins on items so Orders+FAQ behave the same */
}

/* Card styling for BOTH: <details class="fx-faq-item"> and <div class="fx-faq-item"> */
.fx-faq-item {
    background: rgba(5, 9, 16, 0.9);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 0.9rem 1rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* spacing between cards (Orders + FAQ lists) */
.fx-faq-list > .fx-faq-item {
    margin-bottom: 0.85rem;
}
.fx-faq-list > .fx-faq-item:last-child {
    margin-bottom: 0;
}

/* Only applies when the faq item is a proper <details> */
details.fx-faq-item > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    padding-right: 1.5rem;
}

/* Show +/- ONLY for FAQ details that explicitly opt-in via .fx-toggle */
.fx-faq details.fx-faq-item.fx-toggle > summary::after {
    content: "+";               /* no !important needed now */
    position: absolute;
    right: 0.2rem;
    top: 0;
    font-weight: 800;
}

.fx-faq details.fx-faq-item.fx-toggle[open] > summary::after {
    content: "–";
}

/* FAQ body text */
.fx-faq-item p {
    margin-top: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* -------------------------
   Contact Form
-------------------------- */
.fx-form-wrap {
    max-width: 720px;
    margin: 0 auto 3rem;
}

.fx-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.fx-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.fx-form-row label {
    font-size: 0.9rem;
    color: var(--text-main);
}

.fx-input,
.fx-select,
.fx-textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(5, 9, 16, 0.95);
    color: var(--text-main);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.fx-input:focus,
.fx-select:focus,
.fx-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 179, 107, 0.30);
    background: rgba(5, 9, 16, 1);
}

.fx-input--small { max-width: 180px; }
.fx-input--error { border-color: #ff4b6b; }

.fx-textarea {
    resize: vertical;
    min-height: 140px;
}

/* Buttons */
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.8rem;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: var(--bg-main);
    font-weight: 750;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 179, 107, 0.24);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    text-decoration: none;
}

.fx-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 179, 107, 0.34);
    background: #00a162;
}

.fx-btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: none;
}

.fx-btn-outline:hover {
    background: rgba(255,255,255,0.04);
    box-shadow: none;
}

.fx-field-error {
    font-size: 0.82rem;
    color: #ff8598;
}

.fx-alert {
    max-width: 720px;
    margin: 0 auto 1.2rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
}

.fx-alert--error {
    background: rgba(120, 10, 30, 0.90);
    border: 1px solid #ff4b6b;
    color: #ffd8e0;
}

/* Honeypot */
.fx-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* -------------------------
   Footer
-------------------------- */
.fx-footer {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    background: #03060c;
}

/* -------------------------
   Trading Bot Stats
-------------------------- */
.fx-stats-wrap {
    background: var(--bg-panel-solid);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.2rem 1.1rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.fx-stats-title {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.fx-stats-sub {
    margin: 0 0 1rem 0;
    color: var(--text-muted);
}

.fx-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.fx-stat {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0.85rem 0.85rem 0.75rem;
    min-width: 0;
}

.fx-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.fx-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1100px) {
    .fx-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .fx-stats-grid { grid-template-columns: 1fr; }
    .fx-stat-value { font-size: 1.25rem; }
}

/* -------------------------
   Pricing (Trading Bot page)
-------------------------- */
.fx-pricing { margin-top: 1.6rem; }

.fx-pricing-wrap {
    background: var(--bg-panel-solid);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius-md);
    padding: 1.1rem;
}

.fx-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

@media (max-width: 900px) {
    .fx-pricing-grid { grid-template-columns: 1fr; }
}

.fx-pricing-card {
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius-md);
    padding: 1.05rem;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.fx-pricing-card.fx-pricing-popular {
    border-color: rgba(0,179,107,0.35);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 0 0 1px rgba(0,179,107,0.18);
}

.fx-pricing-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-main);
}

.fx-pricing-price {
    margin-top: 0.55rem;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.fx-pricing-price span {
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--text-muted);
    margin-left: 0.35rem;
}

.fx-pricing-subtext {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.fx-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0.85rem 0 1rem;
}

.fx-pricing-features li {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.fx-pricing-features li:last-child { border-bottom: 0; }

/* Pricing badge (top-right) - renamed to avoid collisions with .fx-badge */
.fx-pricing-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.74rem;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    background: rgba(0,179,107,0.14);
    border: 1px solid rgba(0,179,107,0.22);
    color: var(--text-main);
    white-space: nowrap;
}

.fx-soon {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-left: 0.35rem;
}

/* -------------------------
   Trading Bot Feature List Cards
-------------------------- */
.fx-features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1rem 0 2rem;
}

@media (max-width: 900px) {
    .fx-features-grid { grid-template-columns: 1fr; }
}

.fx-features-grid .fx-feature-card {
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--radius-md);
    padding: 1rem 1.05rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transform: none;
}

.fx-features-grid .fx-feature-card:hover {
    transform: none;
    border-color: rgba(0,179,107,0.22);
}

.fx-features-grid .fx-feature-card h3 {
    font-size: 1rem;
    margin: 0 0 0.6rem;
    color: var(--text-main);
}

.fx-features-grid .fx-feature-card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
}

.fx-features-grid .fx-feature-card li { margin: 0.35rem 0; }

/* -------------------------
   Responsive
-------------------------- */
@media (max-width: 900px) {
    .fx-grid-2 { grid-template-columns: 1fr; }
    .fx-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .fx-main { padding: 2.2rem 1rem 2rem; }
    .fx-nav { gap: 0.6rem; }
    .fx-input--small { max-width: 100%; }
}

/* -------------------------
   Media images (screenshots / graphs)
-------------------------- */
.fx-media-image {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    display: block;
}
/* ---------------------------------------------------------
   Downloads tree: enable +/- ONLY in this section
---------------------------------------------------------- */
.fx-downloads details.fx-faq-item.fx-toggle > summary::after {
    content: "+";
    position: absolute;
    right: 0.2rem;
    top: 0;
    font-weight: 800;
}

.fx-downloads details.fx-faq-item.fx-toggle[open] > summary::after {
    content: "–";
}
