/* ======================================================
   BASE RESET
====================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", system-ui, sans-serif;
}

body {
    background: radial-gradient(circle at top, #0a1428, #030712);
    color: #dbe7ff;
    min-height: 100vh;
}

/* ======================================================
   APP LAYOUT
====================================================== */
.app {
    display: flex;
    height: 100vh;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    padding: 26px;
    overflow-y: auto;
}

/* ======================================================
   SIDEBAR
====================================================== */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0a132b, #050a18);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.04);
}

.logo {
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 30px;
    color: #3b82f6;
}

.sidebar nav a {
    display: block;
    padding: 12px 14px;
    margin-bottom: 6px;
    color: #b8c4f0;
    text-decoration: none;
    border-radius: 8px;
    transition: all .2s ease;
}

.sidebar nav a:hover {
    background: rgba(59,130,246,0.12);
    color: #ffffff;
}

.sidebar nav .active {
    background: rgba(59,130,246,0.18);
    color: #ffffff;
}

.logout {
    margin-top: auto;
    color: #ff6b6b !important;
}

/* ======================================================
   TOPBAR
====================================================== */
.topbar {
    height: 70px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(8,16,40,0.65);
    backdrop-filter: blur(6px);
}

/* ======================================================
   CARDS
====================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.card {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.04);
}

/* ======================================================
   MARKET AREA (Dashboard)
====================================================== */
.market-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}

.chart-box,
.market-table {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.04);
    min-height: 500px;
}

/* ======================================================
   PAGE BOX / FORMS
====================================================== */
.page-box {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.04);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #0a132b;
    color: #ffffff;
}

button.primary {
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #1e3a8a, #2563eb);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

/* ======================================================
   TRANSACTION HISTORY
====================================================== */
.tx-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

.tx-table th,
.tx-table td {
    padding: 12px 10px;
    font-size: 14px;
}

.tx-table th {
    color: #8ea2ff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tx-table td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.tx-type {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.tx-deposit {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.tx-withdraw {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.tx-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: rgba(34,197,94,0.18);
    color: #22c55e;
}

.status-pending {
    background: rgba(245,158,11,0.18);
    color: #f59e0b;
}

.status-failed {
    background: rgba(239,68,68,0.18);
    color: #ef4444;
}

.amount-positive {
    color: #22c55e;
    font-weight: 600;
}

.amount-negative {
    color: #ef4444;
    font-weight: 600;
}

/* ======================================================
   FLOATING LANGUAGE MENU
====================================================== */
.floating-globe {
    position: fixed;
    right: 20px;
    bottom: 20px;
    font-size: 30px;
    cursor: pointer;
    z-index: 999999;
    user-select: none;
}

.lang-menu {
    position: fixed;
    background: #0a132b;
    padding: 10px;
    border-radius: 10px;
    display: none;
    z-index: 999999;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lang-menu button {
    display: block;
    width: 100%;
    background: #111c44;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    text-align: left;
}

.lang-menu button:hover {
    background: #1b2c66;
}

/* ======================================================
   LANDING PAGE
====================================================== */
.landing-wrapper {
    width: 100%;
    overflow-x: hidden;
}

.landing-header {
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(8,16,40,0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand {
    color: #3b82f6;
    font-weight: 600;
    letter-spacing: 1px;
}

.menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    display: none;
}

.header-right {
    display: flex;
    gap: 14px;
}

.header-btn {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #dbe7ff;
    background: rgba(255,255,255,0.05);
    transition: 0.2s ease;
}

.header-btn:hover {
    background: rgba(255,255,255,0.1);
}

.primary-btn {
    background: linear-gradient(90deg, #1e3a8a, #2563eb);
    color: #fff;
}

.hero {
    padding: 120px 40px;
    text-align: center;
    background: radial-gradient(circle at center, #0f1d3f, #030712);
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: #9fb3ff;
    margin-bottom: 30px;
}

.cta-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.market-preview {
    padding: 80px 40px;
}

.market-preview h2 {
    margin-bottom: 30px;
    text-align: center;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.market-card {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    padding: 20px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform 0.2s ease;
}

.market-card:hover {
    transform: translateY(-5px);
}

.market-card h3 {
    margin-bottom: 8px;
}

.market-card p {
    font-size: 20px;
    margin-bottom: 6px;
}

.positive {
    color: #22c55e;
    font-weight: 600;
}

.negative {
    color: #ef4444;
    font-weight: 600;
}

.features {
    padding: 80px 40px;
    background: #050a18;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.feature-box {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.04);
}

.cta-section {
    padding: 80px 40px;
    text-align: center;
    background: radial-gradient(circle at top, #0f1d3f, #030712);
}

.cta-section h2 {
    margin-bottom: 15px;
}

.cta-section p {
    margin-bottom: 25px;
    color: #9fb3ff;
}

.footer {
    padding: 60px 40px 30px;
    background: #030712;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-grid h3,
.footer-grid h4 {
    margin-bottom: 12px;
    color: #ffffff;
}

.footer-grid p {
    color: #9fb3ff;
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
    color: #6b7bbd;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }

    .menu-toggle {
        display: block;
    }

    .landing-header {
        padding: 0 20px;
    }

    .hero,
    .market-preview,
    .features,
    .cta-section {
        padding: 60px 20px;
    }
}
/* ======================================================
   UNIFIED MARKET OVERVIEW (DASHBOARD)
====================================================== */

.market-unified {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    border-radius: 16px;
    padding: 26px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.45);
}

.market-title {
    margin-bottom: 22px;
    font-size: 20px;
}

.market-top-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.asset-card {
    background: rgba(255,255,255,0.03);
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.asset-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.asset-price {
    font-size: 20px;
    margin: 6px 0;
}

.chart-wrapper {
    width: 100%;
    height: 420px;
    border-radius: 14px;
    overflow: hidden;
}

#tv_dashboard_chart {
    width: 100%;
    height: 100%;
}

/* Responsive Fix */
@media (max-width: 900px) {
    .market-top-cards {
        grid-template-columns: 1fr;
    }
}
/* ===============================================
   LANDING MARKET UPGRADE
=============================================== */

.market-preview-box {
    background: linear-gradient(160deg, #0b1a38, #060f22);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.45);
}

.landing-chart-wrapper {
    margin-top: 28px;
    height: 420px;
    border-radius: 14px;
    overflow: hidden;
}

#landing_chart {
    width: 100%;
    height: 100%;
}
/* ======================================================
   LANDING PAGE – INSTITUTIONAL AGGRESSIVE UPGRADE
====================================================== */

/* Market container neon breathing glow */
.market-preview-box {
    position: relative;
    background: linear-gradient(160deg, #0b1a38, #060f22);
    border-radius: 18px;
    padding: 35px;
    border: 1px solid rgba(59,130,246,0.25);
    box-shadow: 0 0 40px rgba(37,99,235,0.15);
    animation: marketGlow 4s ease-in-out infinite alternate;
}

@keyframes marketGlow {
    from { box-shadow: 0 0 25px rgba(37,99,235,0.15); }
    to { box-shadow: 0 0 65px rgba(37,99,235,0.35); }
}

/* Floating market cards */
.market-card {
    cursor: pointer;
    transition: all .35s ease;
    animation: floatCard 6s ease-in-out infinite;
}

.market-card:nth-child(2) { animation-delay: 1s; }
.market-card:nth-child(3) { animation-delay: 2s; }

@keyframes floatCard {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.market-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 0 35px rgba(59,130,246,0.4);
}

/* Price flash animation */
.price-up {
    color: #22c55e !important;
    animation: flashUp 0.6s ease;
}

.price-down {
    color: #ef4444 !important;
    animation: flashDown 0.6s ease;
}

@keyframes flashUp {
    0% { text-shadow: 0 0 0px #22c55e; }
    50% { text-shadow: 0 0 15px #22c55e; }
    100% { text-shadow: 0 0 0px #22c55e; }
}

@keyframes flashDown {
    0% { text-shadow: 0 0 0px #ef4444; }
    50% { text-shadow: 0 0 15px #ef4444; }
    100% { text-shadow: 0 0 0px #ef4444; }
}

/* Chart wrapper sizing */
.landing-chart-wrapper {
    margin-top: 30px;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
}

/* Feature cards expansion */
.feature-box {
    min-height: 280px;
    line-height: 1.6;
    transition: all .3s ease;
    box-shadow: 0 0 25px rgba(37,99,235,0.08);
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 45px rgba(59,130,246,0.25);
}

.feature-box p {
    margin-bottom: 12px;
    color: #9fb3ff;
    font-size: 14px;
}
/* =========================================
   MOBILE REFINEMENT – PREMIUM VERSION
========================================= */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    /* HEADER */
    .landing-header {
        padding: 14px 18px;
    }

    .brand {
        font-size: 20px;
    }

    .header-right {
        gap: 12px;
    }

    .header-btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    /* HERO */
    .hero {
        padding: 70px 20px 40px 20px;
    }

    .hero h1 {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 20px;
        opacity: 0.85;
    }

    .cta-btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    /* SECTION TITLES */
    .market-preview h2,
    .features h2 {
        font-size: 24px;
        padding: 0 20px;
        margin-bottom: 20px;
    }

    /* MARKET CONTAINER */
    .market-preview {
        padding: 0 15px;
    }

    .market-preview-box {
        padding: 18px;
        border-radius: 22px;
    }

    /* STACK CARDS */
    .market-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .market-card {
        padding: 18px;
        border-radius: 18px;
    }

    .market-card h3 {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .market-card p {
        font-size: 20px;
        font-weight: 600;
    }

    .market-card span {
        font-size: 13px;
        opacity: 0.8;
    }

    /* CHART FIX */
    .landing-chart-wrapper {
        height: 280px;
        margin-top: 20px;
        border-radius: 18px;
    }

    /* FEATURES */
    .features {
        padding: 50px 18px;
    }

    .feature-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .feature-box {
        padding: 22px;
        border-radius: 20px;
        min-height: auto;
    }

    .feature-box h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .feature-box p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* CTA */
    .cta-section {
        padding: 60px 20px;
        text-align: center;
    }

    .cta-section h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .cta-section p {
        font-size: 14px;
        margin-bottom: 18px;
    }

    /* FOOTER */
    .footer {
        padding-top: 40px;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 28px;
        padding: 30px 20px;
    }

    .footer-grid h4 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .footer-grid p {
        font-size: 13px;
        opacity: 0.75;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 20px;
        text-align: center;
    }

}
/* =========================================
   PREMIUM MICRO INTERACTION + MOBILE GLOW
========================================= */

/* ---------- Button Micro-Press ---------- */

.cta-btn,
.header-btn {
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.cta-btn:active,
.header-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}


/* ---------- Mobile Glow Refinement ---------- */

@media (max-width: 768px) {

    .market-preview-box {
        box-shadow: 0 0 40px rgba(59,130,246,0.18);
        animation: mobileGlow 6s ease-in-out infinite alternate;
    }

    @keyframes mobileGlow {
        from { box-shadow: 0 0 25px rgba(59,130,246,0.15); }
        to   { box-shadow: 0 0 55px rgba(59,130,246,0.28); }
    }

    .feature-box {
        box-shadow: 0 0 18px rgba(59,130,246,0.08);
    }

}
/* === Android Visual Enhancement Layer === */
@supports not (-webkit-touch-callout: none) {

  .market-card,
  .feature-box,
  .market-preview-box {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55),
                0 0 45px rgba(37, 99, 235, 0.35);
  }

  .landing-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

}

/* SHOW hamburger ALWAYS */
.menu-toggle {
    display: block !important;
    font-size: 24px;
    margin-right: 12px;
}

/* Sidebar mobile behavior */
@media (max-width: 900px) {

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}
/* Better spacing */
.content {
    padding: 30px;
}

/* Cards pop */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Market layout fix */
.market-area {
    align-items: stretch;
}

/* FIX TRADINGVIEW BOX */
.chart-box {
    display: flex;
    flex-direction: column;
}

#tv_dashboard_chart {
    flex: 1;
    width: 100%;
    height: 100% !important;
    min-height: 400px;
}

/* Better table look */
.market-table table {
    width: 100%;
}

.market-table td,
.market-table th {
    text-align: left;
}

/* Topbar alignment fix */
.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* =========================================
   MOBILE SIDEBAR SYSTEM (FINAL FIX)
========================================= */

/* SHOW hamburger ALWAYS */
.menu-toggle {
    display: block !important;
    font-size: 24px;
    margin-right: 12px;
}

/* Sidebar mobile behavior */
@media (max-width: 900px) {

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* =========================================
   DASHBOARD VISUAL UPGRADE
========================================= */

/* Better spacing */
.content {
    padding: 30px;
}

/* Cards pop */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Market layout fix */
.market-area {
    align-items: stretch;
}

/* FIX TRADINGVIEW BOX */
.chart-box {
    display: flex;
    flex-direction: column;
}

#tv_dashboard_chart {
    flex: 1;
    width: 100%;
    height: 100% !important;
    min-height: 400px;
}

/* Better table look */
.market-table table {
    width: 100%;
}

.market-table td,
.market-table th {
    text-align: left;
}

/* Topbar alignment fix */
.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app {
    min-height: 100vh !important;
    width: 100% !important;
}

.main {
    width: 100% !important;
}

.content {
    width: 100% !important;
}

/* Fix layout spacing issue */
.market-area {
    width: 100% !important;
}

/* Fix chart + box overflow */
.chart-box,
.market-table {
    width: 100% !important;
    overflow: hidden;
}

/* FORCE TradingView to fit */
#tv_dashboard_chart {
    width: 100% !important;
    height: 400px !important;
}

#tv_dashboard_chart iframe {
    width: 100% !important;
    height: 100% !important;
}