:root {
  --primary-gold: #C9A24B;
  --secondary-gold: #A77C24;
  --dark-gold: #785207;
  --gold-light-bg: rgba(201, 162, 75, 0.08);
  --gold-gradient: linear-gradient(135deg, #EAD087 0%, #C9A24B 45%, #A77C24 80%, #684E11 100%);
  --gold-card-bg: linear-gradient(135deg, #2D2517 0%, #1A160F 100%);
  --bg-main: #F6F7FB;
  --card-bg: #FFFFFF;
  --text-primary: #1F2937;
  --text-muted: #6B7280;
  --border-color: #EAEAEA;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-main: 0 10px 30px rgba(31, 41, 55, 0.05);
  --shadow-gold: 0 12px 30px rgba(201, 162, 75, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

footer {
  margin-top: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: 'Outfit', sans-serif;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F1F1;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}

.bg-gold-subtle {
  background-color: var(--gold-light-bg) !important;
}

.text-gold {
  color: var(--primary-gold) !important;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #FFFFFF !important;
  border: none;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.4rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(201, 162, 75, 0.25);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
  color: #FFFFFF !important;
  filter: brightness(1.05);
}

.btn-outline-gold {
  border: 1.5px solid var(--primary-gold);
  color: var(--primary-gold);
  font-weight: 600;
  border-radius: var(--radius-md);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline-gold:hover,
.btn-outline-gold.active {
  background: var(--primary-gold);
  color: #FFFFFF !important;
  transform: translateY(-2px);
}

.aurum-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-main);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.aurum-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(31, 41, 55, 0.08);
  border-color: rgba(201, 162, 75, 0.3);
}

.glass-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1040;
}

.nav-link-aurum {
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.55rem 0.9rem !important;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-link-aurum:hover,
.nav-link-aurum.active {
  color: var(--primary-gold);
  background-color: var(--gold-light-bg);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-weight: 800;
  font-size: 1.25rem;
}

.brand-logo img {
  width: 42px;
  height: 42px;
}

/* Auth Screens Styles */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #12100C 0%, #1A160F 50%, #0F0D0A 100%);
  position: relative;
  padding: 2rem 1rem;
}
.auth-wrapper-register {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #12100C 0%, #1A160F 50%, #0F0D0A 100%);
  position: relative;
  padding: 2rem 1rem;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  background: radial-gradient(circle, rgba(201, 162, 75, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.mobile-brand-logo {
  display: none;
}

@media (max-width: 991.98px) {
  .welcome-header {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .mobile-brand-logo {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.25rem;
  }

  .mobile-brand-logo img {
    height: 90px;
    object-fit: contain;
    margin-bottom: 6px;
  }

  /* Auth Screens Styles */
  .auth-wrapper {
    min-height: auto !important;
  }
}

.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
  border-color: #d4af37 !important;
}


.auth-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 1050px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 75, 0.3);
}

.auth-banner {
  background: var(--gold-card-bg);
  color: #FFFFFF;
  padding: 3.5rem 3rem !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-banner::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(201, 162, 75, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
}

.welcome-hero {
  background: linear-gradient(135deg, #1A1814 0%, #2D261A 50%, #15130F 100%);
  border-radius: var(--radius-xl);
  color: #FFFFFF;
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.welcome-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(201, 162, 75, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.badge-rank {
  background: rgba(201, 162, 75, 0.18);
  border: 1px solid rgba(201, 162, 75, 0.5);
  color: #EAD087;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wallet-card-luxury {
  background: var(--gold-gradient);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 1.8rem;
  position: relative;
  box-shadow: var(--shadow-gold);
  overflow: hidden;
}

.wallet-card-luxury::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.wallet-card-luxury .wallet-btn {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 0.55rem 1rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.wallet-card-luxury .wallet-btn:hover {
  background: #FFFFFF;
  color: var(--secondary-gold);
}

.profile-avatar-container {
  position: relative;
  width: 90px;
  height: 90px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-gold);
  box-shadow: var(--shadow-sm);
}

.rank-badge-overlay {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--gold-gradient);
  color: #FFF;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid #FFF;
}

.referral-box {
  background: #F9FAFB;
  border: 1.5px dashed var(--primary-gold);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.8rem;
}

.referral-input {
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--text-primary);
  width: 100%;
  font-size: 0.85rem;
}

.referral-input:focus {
  outline: none;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.growth-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.growth-pill.positive {
  background: #DCFCE7;
  color: #15803D;
}

.product-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-main);
  border-color: rgba(201, 162, 75, 0.4);
}

.product-img-wrap {
  height: 180px;
  background: #F9FAFB;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrap img {
  max-height: 85%;
  max-width: 85%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.08);
}

.product-bv-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(31, 41, 55, 0.85);
  color: var(--primary-gold);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* Binary Tree Visualizer Styles */
.tree-node {
  background: #FFF;
  border: 2px solid var(--primary-gold);
  border-radius: 16px;
  padding: 12px;
  min-width: 140px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: inline-block;
  position: relative;
  transition: all 0.3s ease;
}

.tree-node:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-gold);
}

.tree-connector {
  width: 2px;
  background: #D1D5DB;
  height: 25px;
  margin: 0 auto;
}

.tree-branch {
  border-top: 2px solid #D1D5DB;
  position: relative;
  margin-bottom: 25px;
}

.page-view {
  display: none;
}

.page-view.active-view {
  display: block;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-aurum {
  vertical-align: middle;
  font-size: 0.88rem;
}

.table-aurum thead th {
  background-color: #F9FAFB;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table-aurum tbody td {
  padding: 1rem;
  border-bottom: 1px solid #F3F4F6;
}

@media (max-width: 991.98px) {
  .auth-banner {
    display: none;
  }

  .table-responsive-cards thead {
    display: none;
  }

  .table-responsive-cards tbody tr {
    display: block;
    background: #FFF;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem;
  }

  .table-responsive-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F3F4F6;
    padding: 0.6rem 0.4rem;
  }

  .table-responsive-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
  }
}

.btn-gold-gradient {
  background: var(--gold-gradient);
  color: #1A160F;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(201, 162, 75, 0.3);
}

.btn-gold-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 75, 0.45);
  color: #000;
}

.form-control-aurum,
.form-select-aurum {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-control-aurum:focus,
.form-select-aurum:focus {
  background-color: #FFFFFF;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 4px var(--gold-light-bg);
  outline: none;
}

.input-group-text-aurum {
  background: var(--gold-light-bg);
  border: 1px solid var(--border-color);
  border-right: none;
  color: var(--primary-gold);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

    .trading-card-glow {
        position: relative;
    }

    .trading-terminal {
        background: #f8f9fa;
        border-radius: 16px;
        padding: 16px;
        min-height: 380px;
        border: 1px solid rgba(212, 175, 55, 0.4);
        box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05);
    }

    /* TRADINGVIEW STYLE PANEL - LIGHT THEME */
    .trading-view-container {
        width: 100%;
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e0e3eb;
        overflow: hidden;
        margin-bottom: 15px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }

    .chart-header-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 14px;
        background: #f1f3f6;
        border-bottom: 1px solid #e0e3eb;
        font-size: 12px;
    }

    .pair-title {
        color: #b78103;
        font-weight: 700;
        font-size: 13px;
    }

    .tf-btn {
        color: #5d606b;
        padding: 2px 6px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 11px;
        font-weight: 600;
        transition: all 0.2s;
    }

    .tf-btn:hover,
    .tf-btn.active {
        color: #131722;
        background: #e0e3eb;
    }

    .chart-canvas-wrapper {
        position: relative;
        width: 100%;
        height: 220px;
    }

    .chart-canvas-wrapper canvas {
        display: block;
        width: 100%;
        height: 100%;
    }

    .live-price-strip {
        display: flex;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
        font-size: 11px;
        color: #707a8a;
    }

    .lp-item b {
        font-weight: 700;
        margin: 0 3px;
        color: #1e222d;
    }

    .ai-orb {
        width: 65px;
        height: 65px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #d4af37;
        background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.02) 70%);
        box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4), 0 0 16px rgba(212, 175, 55, 0.15);
        animation: orbPulse 2.4s ease-in-out infinite;
    }

    @keyframes orbPulse {

        0%,
        100% {
            box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3), 0 0 10px rgba(212, 175, 55, 0.15);
        }

        50% {
            box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.6), 0 0 22px rgba(212, 175, 55, 0.3);
        }
    }

    .btn-trade-execute {
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, #f0d878, #d4af37 60%, #b8860b);
        color: #1a1a1a;
        font-weight: 700;
        border: none;
        padding: 10px 28px;
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
        transition: transform 0.15s ease;
    }

    .btn-trade-execute:hover {
        transform: translateY(-2px);
    }

    .btn-trade-execute .shine {
        position: absolute;
        top: 0;
        left: -60%;
        width: 40%;
        height: 100%;
        background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.8), transparent);
        animation: shineSweep 2.2s ease-in-out infinite;
    }

    @keyframes shineSweep {
        0% {
            left: -60%;
        }

        60% {
            left: 120%;
        }

        100% {
            left: 120%;
        }
    }

    .ring-progress {
        position: relative;
        width: 120px;
        height: 120px;
    }

    .ring-progress svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

    .ring-bg {
        fill: none;
        stroke: rgba(212, 175, 55, 0.2);
        stroke-width: 8;
    }

    .ring-fg {
        fill: none;
        stroke: #d4af37;
        stroke-width: 8;
        stroke-linecap: round;
        stroke-dasharray: 327;
        stroke-dashoffset: 327;
        filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4));
        transition: stroke-dashoffset 0.2s linear;
    }

    .ring-center {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .ring-center span {
        font-weight: 800;
        color: #1e222d;
        font-size: 18px;
    }

    .chart-bars {
        display: flex;
        align-items: flex-end;
        gap: 3px;
        height: 18px;
    }

    .chart-bars span {
        width: 3px;
        height: 8px;
        background: linear-gradient(180deg, #f0d878, #d4af37);
        border-radius: 2px;
        animation: barBounce 0.8s ease-in-out infinite alternate;
    }

    .chart-bars span:nth-child(2) {
        animation-delay: 0.1s;
    }

    .chart-bars span:nth-child(3) {
        animation-delay: 0.2s;
    }

    .chart-bars span:nth-child(4) {
        animation-delay: 0.3s;
    }

    .chart-bars span:nth-child(5) {
        animation-delay: 0.4s;
    }

    .ticker-tape {
        display: flex;
        gap: 14px;
        justify-content: center;
        flex-wrap: wrap;
        font-size: 11px;
        font-weight: 600;
        margin-top: 8px;
    }

    .ticker-up {
        color: #089981;
    }

    .ticker-down {
        color: #f23645;
    }

    .pulse-dot {
        animation: pulseDot 1.4s ease-in-out infinite;
    }

    @keyframes pulseDot {

        0%,
        100% {
            opacity: 1;
            transform: scale(1);
        }

        50% {
            opacity: 0.4;
            transform: scale(1.3);
        }
    }

    .trade-success-icon {
        position: relative;
        display: inline-block;
    }

    .trade-success-icon i {
        animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        filter: drop-shadow(0 0 6px rgba(8, 153, 129, 0.3));
    }

    .confetti {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 6px;
        height: 10px;
        opacity: 0;
        animation: confettiFall 0.9s ease-out forwards;
    }

    .c1 {
        background: #d4af37;
        --tx: -50px;
        --ty: -50px;
        animation-delay: 0.3s;
    }

    .c2 {
        background: #089981;
        --tx: 50px;
        --ty: -50px;
        animation-delay: 0.34s;
    }

    .c3 {
        background: #2962ff;
        --tx: -70px;
        --ty: 0px;
        animation-delay: 0.32s;
    }

    .c4 {
        background: #f23645;
        --tx: 70px;
        --ty: 0px;
        animation-delay: 0.36s;
    }

    .c5 {
        background: #f0d878;
        --tx: -40px;
        --ty: 50px;
        animation-delay: 0.38s;
    }

    .c6 {
        background: #8e24aa;
        --tx: 40px;
        --ty: 50px;
        animation-delay: 0.4s;
    }

    .c7 {
        background: #d4af37;
        --tx: 0px;
        --ty: -70px;
        animation-delay: 0.35s;
    }

    .c8 {
        background: #089981;
        --tx: 0px;
        --ty: 70px;
        animation-delay: 0.42s;
    }

    @keyframes confettiFall {
        0% {
            opacity: 1;
            transform: translate(-50%, -50%) rotate(0deg) scale(1);
        }

        100% {
            opacity: 0;
            transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(340deg) scale(0.4);
        }
    }

    @keyframes barBounce {
        0% {
            height: 4px;
            opacity: 0.4;
        }

        100% {
            height: 18px;
            opacity: 1;
        }
    }

    @keyframes popIn {
        0% {
            transform: scale(0);
            opacity: 0;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }
