/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background: #000000;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* ===== DIAGONAL LINES BACKGROUND ===== */


/* ===== TOP GLOW BORDERS ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #4f46e5 20%, #7c3aed 50%, #4f46e5 80%, transparent 100%);
    z-index: 9999;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #4f46e5 20%, #7c3aed 50%, #4f46e5 80%, transparent 100%);
    z-index: 9999;
}

/* ===== HEADER ===== */
header {
    position: relative;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    height: 64px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    width: 120px;
    height: 42px;
    object-fit: contain;
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Language/Flag button */
.lang-btn-wrap {
    position: relative;
}

#lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

#lang-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

#lang-btn img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

#lang-btn .chevron {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

/* Hamburger */
.hamburger-btn {
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 20px;
    transition: background 0.2s, color 0.2s;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* ===== MOBILE PILLS ===== */
.mobile-pills {
    display: none;
    z-index: 100;
    position: relative;
    padding: 4px 14px 10px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mobile-pills::-webkit-scrollbar {
    display: none;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pill-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

/* ===== MAIN PAGE LAYOUT ===== */
.page-wrap {
  position: relative;
  /* NO z-index — removing it prevents trapping dropdowns in a lower stacking context */
  max-width: 1050px;
  padding: 14px 24px 0;
  display: grid;
  grid-template-columns: 1fr 248px;
  gap: 18px;
  align-items: start;
  min-height: calc(100vh - 62px - 180px);
  /* ensures footer stays just below viewport fold */
}

/* ===== SWAP CARD ===== */
.swap-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 18px;
  padding: 14px;
}

/* Currency boxes */
.currency-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    padding: 12px 14px 14px;
}

.box-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
}

.box-sep {
    color: rgba(255, 255, 255, 0.12);
}

.box-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
}

.box-usd {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.box-arrows-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.box-arrows-icon:hover {
    opacity: 0.8;
}

.box-arrows-icon img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: invert(1);
}

.box-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Amount display */
.amount-text {
    font-size: 28px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.28);
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -1px;
    line-height: 1;
}

.amount-text .val {
    color: #fff;
    font-weight: 600;
}

/* Editable from-amount input — matches the display style exactly */
.amount-text {
    display: flex;
    align-items: baseline;
    gap: 0;
}
.amount-prefix {
    color: rgba(255,255,255,0.28);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}
.amount-input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -1px;
    line-height: 1;
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 60px;
    cursor: text;
}
.amount-input::placeholder { color: rgba(255,255,255,0.2); }
/* Remove number spinners */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input[type=number] { -moz-appearance: textfield; }

/* Price loading state */
.price-loading {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.price-error { color: rgba(255,80,80,0.6); font-size: 11px; }


/* Coin selector button */
.coin-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 148px;
    flex-shrink: 0;
    position: relative;
    user-select: none;
}

.coin-selector:hover {
    background: rgba(255, 255, 255, 0.08);
}

.coin-img-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coin-info {
    flex: 1;
    min-width: 0;
}

.coin-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coin-ticker {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

.sel-chevron {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.sel-chevron.up {
    transform: rotate(180deg);
}

/* Swap direction button */
.swap-dir {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.swap-dir-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.swap-dir-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: rotate(180deg);
}

/* Address inputs */
.addr-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
    margin: 16px 0 12px;
}

.addr-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 13px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    margin-bottom: 8px;
    transition: border-color 0.2s, color 0.2s;
}

.addr-input:focus {
    border-color: rgba(99, 88, 220, 0.5);
    color: #fff;
}

.addr-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.addr-input.error {
    border-color: rgba(220, 60, 60, 0.5) !important;
}

/* Exchange button */
.exchange-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4e42cc, #3d35b0);
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

.exchange-btn:hover {
    background: linear-gradient(135deg, #5e52dc, #4d45c0);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(78, 66, 204, 0.38);
}

/* ===== COIN DROPDOWN ===== */
.coin-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 280px;
    background: #14142a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    z-index: 500;
    overflow: hidden;
}

.coin-dropdown.open {
    display: block;
}

.cd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 6px;
    font-size: 13px;
}

.cd-side {
    color: rgba(255, 255, 255, 0.35);
}

.cd-selected {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.cd-search-wrap {
    padding: 4px 12px 8px;
}

.cd-search {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 12px 9px 34px;
    color: #ccc;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555577' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 11px center;
}

.cd-search::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.cd-search:focus {
    border-color: rgba(99, 88, 220, 0.4);
}

.cd-section-label {
    padding: 6px 16px 3px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.cd-list {
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.cd-list::-webkit-scrollbar {
    width: 4px;
}

.cd-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.cd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.12s;
}

.cd-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cd-coin-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cd-coin-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.net-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 6px;
}

/* ===== RIGHT COLUMN ===== */
.right-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Ad banner */
.ad-banner {
    border-radius: 14px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.ad-banner:hover {
    transform: scale(1.01);
}

.ad-banner img {
    width: 100%;
    display: block;
    border-radius: 14px;
}

/* How-it-works card */
.how-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 14px;
    padding: 18px 18px 14px;
}

.step-item {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    position: relative;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 18px;
    bottom: -22px;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.step-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 2;
}

.step-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
}

.step-body h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.step-body p {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

/* ===== LANGUAGE DROPDOWN ===== */
#lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 240px;
    background: #14142a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    z-index: 600;
    overflow: hidden;
    padding-bottom: 6px;
}

#lang-dropdown.open {
    display: block;
}

.ld-title {
    padding: 14px 16px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ld-search-wrap {
    padding: 0 12px 8px;
}

.ld-search {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 12px 9px 34px;
    color: #ccc;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555577' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 11px center;
}

.ld-search::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.ld-section-label {
    padding: 6px 16px 3px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.ld-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.12s;
}

.ld-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ld-flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.ld-flag-emoji {
    font-size: 20px;
}

.ld-info {
    flex: 1;
}

.ld-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.ld-code {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

.ld-check {
    color: #7b5cf5;
    font-size: 14px;
}

/* ===== SLIDE MENU ===== */
#menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 800;
    backdrop-filter: blur(2px);
}

#menu-overlay.open {
    display: block;
}

#slide-menu {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100%;
    background: #0e0e1e;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 900;
    transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

#slide-menu.open {
    right: 0;
}

.sm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.sm-lang img {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.sm-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.sm-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sm-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
    text-decoration: none;
}

.sm-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sm-icon {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sm-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sm-text {
    flex: 1;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.sm-chevron {
    color: rgba(255, 255, 255, 0.25);
    font-size: 11px;
    transition: transform 0.2s;
}

.sm-chevron.up {
    transform: rotate(180deg);
}

.curr-acc {
    display: none;
}

.curr-acc.open {
    display: block;
}

.curr-acc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px 11px 60px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.curr-acc-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.curr-acc-item.sel {
    background: rgba(255, 255, 255, 0.05);
}

.curr-acc-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.curr-acc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7b5cf5;
}

.sm-section {
    padding: 18px 20px 8px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sm-empty {
    padding: 0 20px 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 24px 28px;
    text-align: center;
}

.ft-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 22px;
}

.ft-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.ft-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.ft-links a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.ft-links a:hover {
    color: #fff;
}

.ft-social {
    margin-bottom: 22px;
}

.ft-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.ft-social a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.ft-copy {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== CHAT WIDGET ===== */
#chat-widget {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 700;
}

.chat-bubble-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d50e8, #4e42cc);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(78, 66, 204, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    position: relative;
}

.chat-bubble-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(78, 66, 204, 0.65);
}

.chat-bubble-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #e53e3e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border: 2px solid #0c0c17;
}

.chat-panel {
    display: none;
    position: absolute;
    bottom: 62px;
    right: 0;
    width: 340px;
    background: #14142a;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    flex-direction: column;
}

.chat-panel.open {
    display: flex;
}

.cp-header {
    background: linear-gradient(135deg, #6d50e8, #4e42cc);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
}

.cp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-info {
    flex: 1;
}

.cp-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.cp-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.cp-status::before {
    content: '● ';
    color: #4ade80;
    font-size: 8px;
}

.cp-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s;
}

.cp-close:hover {
    color: #fff;
}

.cp-messages {
    padding: 16px;
    min-height: 180px;
    background: #0f0f20;
}

.cp-date {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 14px;
}

.cp-msg {
    display: flex;
    gap: 8px;
}

.cp-msg-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d50e8, #4e42cc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.cp-msg-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-msg-body {
    flex: 1;
}

.cp-msg-text {
    background: #1c1c38;
    border-radius: 0 12px 12px 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.cp-msg-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 4px;
    padding-left: 2px;
}

.cp-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #14142a;
}

.cp-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-family: inherit;
}

.cp-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.cp-icons {
    display: flex;
    gap: 8px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 16px;
}

.cp-icons span {
    cursor: pointer;
    transition: color 0.2s;
}

.cp-icons span:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== DROPDOWN OVERLAY ===== */
#dd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
}

#dd-overlay.open {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
    .page-wrap {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .right-col {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ad-banner {
        flex: 1;
        min-width: 200px;
    }

    .how-card {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 640px) {
    .desktop-nav {
        display: none;
    }

    .mobile-pills {
        display: flex;
    }

    header {
        padding: 10px 16px;
        height: 56px;
    }

    .page-wrap {
        padding: 10px 14px 40px;
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .swap-card {
        padding: 14px;
    }

    .amount-text {
        font-size: 26px;
    }

    .coin-selector {
        min-width: 140px;
        padding: 9px 10px;
    }

    #chat-widget {
        bottom: 14px;
        right: 14px;
    }

    .chat-panel {
        width: 300px;
    }

    .right-col {
        flex-direction: column;
    }
}

@media (min-width: 641px) {
    .mobile-only {
        display: none !important;
    }
}

/* ===== CONFIRM MODAL ===== */
#confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 1100;
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#confirm-overlay.open { display: flex; }

.cm-card {
  background: #111111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 24px 24px 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.9);
}
.cm-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cm-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
  line-height: 1.5;
}
.cm-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.cm-box-label {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.cm-box-coin {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.cm-coin-img { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.cm-amount { font-size: 18px; font-weight: 600; color: #fff; }
.cm-network { display: flex; align-items: center; gap: 6px; padding-left: 50px; }
.cm-network-label { font-size: 12px; color: rgba(255,255,255,0.3); }

.cm-confirm-btn {
  width: 100%;
  padding: 14px;
  background: #6a6cdb;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  margin-top: 18px;
  margin-bottom: 8px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.cm-confirm-btn:hover { background: #7b7de3; }

.cm-cancel-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.cm-cancel-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* ===== ORDER PAGE ===== */
#order-page {
  display: none;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  padding: 14px 24px 60px;
  min-height: calc(100vh - 62px - 180px);
}
#order-page.open { display: block; }

.header-back-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-back-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

.op-inner {
  max-width: 580px;
  margin: 0 auto;
  padding: 14px 20px 30px;
}

.op-warning {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.op-warn-top {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 2px;
}
.op-warn-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.op-warn-body { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.6; }

.op-summary-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 4px 0;
  margin-bottom: 14px;
  overflow: hidden;
}
.op-row { padding: 16px 18px; }
.op-row-label {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.op-row-coin { display: flex; align-items: center; gap: 14px; }
.op-coin-img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.op-amount { font-size: 22px; font-weight: 700; color: #fff; }
.op-addr-short { font-size: 12px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.op-divider { height: 1px; background: rgba(255,255,255,0.05); }

.op-qr-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
}
.op-qr-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 18px; }
.op-qr-wrap {
  background: #fff;
  border-radius: 12px;
  width: 190px;
  height: 190px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.op-qr-img { width: 180px; height: 180px; display: block; }
.op-order-id-row { font-size: 13px; color: rgba(255,255,255,0.4); }
.op-order-id-val { color: rgba(255,255,255,0.8); font-family: monospace; }

.op-copy-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  transition: color 0.2s;
  vertical-align: middle;
}
.op-copy-btn:hover { color: rgba(255,255,255,0.8); }
.op-copy-btn.copied { color: #4ade80; }

.op-detail-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 0 4px;
  margin-bottom: 14px;
  overflow: hidden;
}
.op-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.op-detail-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0 16px; }
.op-dl { font-size: 13px; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.op-dr {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  text-align: right;
}
.op-dc-img { width: 24px; height: 24px; border-radius: 50%; }

.op-meta-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 0 4px;
  margin-bottom: 14px;
  overflow: hidden;
}
.op-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}
.op-meta-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0 16px; }
.op-ml { font-size: 11px; color: rgba(255,255,255,0.28); text-transform: uppercase; letter-spacing: 0.8px; }
.op-mr { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.op-status { color: #4ade80 !important; font-weight: 600 !important; }
.op-countdown { color: #fff; font-weight: 600; font-family: monospace; }

.op-details-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 18px 18px 12px;
  margin-bottom: 20px;
}
.op-details-title {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  font-weight: 600;
}
.op-details-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.op-details-row:last-child { border-bottom: none; }
.op-dr2 { flex: 1; font-size: 13px; color: rgba(255,255,255,0.75); text-align: right; word-break: break-all; font-family: monospace; }

.op-new-btn {
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  color: rgba(255,255,255,0.8);
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.op-new-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }