/* ===== TOKEN MARKET (sample screen) ===== */

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0f1724;
  color: #fff;
  margin: 0;
  padding: 0;
}

/* ===== HERO / INTRO ===== */
.event-hero {
  text-align: center;
  padding: 80px 20px 20px 20px;
  background: linear-gradient(135deg, #1e293b, #0f1724);
}

.event-hero h2 {
  font-size: 2.6rem;
  font-weight: bold;
  color: #fbbf24;
  margin-bottom: 10px;
}

.event-hero p {
  font-size: 1.2rem;
  color: #d1d5db;
  max-width: 640px;
  margin: auto;
}

/* ===== CONTENT SECTION ===== */
.event-steps {
  padding: 10px 20px;
  max-width: 980px;
  text-align: center;
  margin: auto;
}

/* === FOOTER === */
footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background-color: #1e293b;
  border-radius: 12px;
  font-size: 0.95em;
  color: #cbd5e1;
}

footer a {
  color: #f59e0b;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.tm-disclaimer {
  background: rgba(245, 158, 11, 0.1);
  border-top: 1px solid #374151;
  border-bottom: 1px solid #374151;
  color: #fbbf24;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px 20px;
}

.tm-disclaimer i {
  margin-right: 6px;
}

.tm-section {
  max-width: 1320px;
  text-align: left;
}

.tm-up { color: #4ade80; }
.tm-down { color: #f87171; }

/* ===== LAYOUT GRID ===== */
.tm-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  grid-template-areas:
    "list chart order"
    "list book  order"
    "list pf    pf";
  gap: 20px;
  align-items: start;
}

.tm-list-panel { grid-area: list; align-self: stretch; }
.tm-chart-panel { grid-area: chart; }
.tm-book-panel { grid-area: book; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tm-order-panel { grid-area: order; align-self: stretch; }
.tm-portfolio { grid-area: pf; }

.tm-panel {
  background: linear-gradient(145deg, #1f2937, #111827);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 18px;
  text-align: left;
}

/* ===== LOGO BUBBLE ===== */
.tm-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
}

/* ===== TOKEN LIST ===== */
.tm-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 12px;
  height: 42px;
  border: 1px solid #374151;
  border-radius: 10px;
  background: #0f1724;
  color: #9ca3af;
}

.tm-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 0.9rem;
}

.tm-search input::placeholder { color: #6b7280; }

.tm-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tm-token-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tm-token-row:hover {
  background: rgba(245, 158, 11, 0.08);
}

.tm-token-row.active {
  background: rgba(245, 158, 11, 0.15);
}

.tm-token-id { flex: 1; min-width: 0; }

.tm-token-ticker {
  font-weight: 800;
  color: #fff;
  font-size: 0.92rem;
}

.tm-token-name {
  font-size: 0.76rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-home-link {
  color: #fbbf24;
  text-decoration: none;
  flex: 0 0 auto;
}

.tm-home-link:hover {
  text-decoration: underline;
}

.tm-token-price {
  text-align: right;
  font-size: 0.85rem;
  color: #fff;
}

.tm-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
}

/* ===== CHART HEAD ===== */
.tm-chart-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #374151;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tm-asset {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tm-sym {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.tm-name {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 2px;
}

.tm-quote { text-align: right; }

.tm-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
}

.tm-change {
  font-size: 0.9rem;
  font-weight: 700;
}

.tm-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid #22c55e;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  font-size: 0.78rem;
  white-space: nowrap;
}

.tm-badge-info { color: #9ca3af; cursor: help; }

/* ===== TIMEFRAME ===== */
.tm-tf {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.tm-tf button {
  min-width: 48px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.tm-tf button:hover { color: #fff; }
.tm-tf button.active { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* ===== CHART ===== */
.tm-chart {
  height: 320px;
  width: 100%;
  overflow: hidden;
}

.tm-chart svg { display: block; }

/* ===== ORDER BOOK ===== */
.tm-book-side h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.tm-book { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.tm-book th { padding: 6px 4px; font-weight: 600; font-size: 0.78rem; color: #9ca3af; border-bottom: 1px solid #374151; }
.tm-book td { padding: 6px 4px; border-bottom: 1px solid #1f2937; }
.tm-book .r { text-align: right; }
.tm-book tr[data-price] { cursor: pointer; }
.tm-book tr[data-price]:hover { background: rgba(255, 255, 255, 0.05); }

/* ===== TRADE FORM ===== */
.tm-tradebox-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tm-tradebox-toggle button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #0f1724;
  color: #9ca3af;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.tm-tradebox-toggle button.active {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  border-color: transparent;
}

.tm-tradebox-toggle button.active.sell {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
}

.tm-tradebox-type {
  gap: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid #374151;
}

.tm-tradebox-type button {
  flex: 1;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 10px;
  margin-bottom: -1px;
  color: #6b7280;
  font-size: 0.85rem;
  border-bottom: 2px solid transparent;
}

.tm-tradebox-type button.active {
  background: transparent;
  color: #fff;
  border-bottom-color: #f59e0b;
}

.tm-field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 10px 0 4px;
}

.tm-token-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid #374151;
  border-radius: 999px;
  background: #0f1724;
  color: #e5e7eb;
  font-size: 0.72rem;
  font-weight: 700;
}

.tm-token-pill .tm-logo { width: 16px; height: 16px; font-size: 8px; }

.tm-input {
  width: 100%;
  background: #0f1724;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.tm-input:focus {
  outline: none;
  border-color: #f59e0b;
}

.tm-input-group {
  display: flex;
  gap: 8px;
}

.tm-max-btn {
  background: #374151;
  color: #fbbf24;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.tm-field-sub {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.tm-fee {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 10px 0;
}

.tm-buy-btn {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  font-weight: 800;
  border-radius: 10px;
  padding: 10px;
}

.tm-buy-btn.sell {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
}

.tm-kyc-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #374151;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.06);
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1.5;
}

.tm-kyc-note i {
  color: #fbbf24;
  margin-top: 1px;
}

/* ===== PORTFOLIO ===== */
.tm-portfolio-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.tm-pf-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  align-items: center;
  gap: 20px;
}

.tm-portfolio-label {
  font-size: 0.8rem;
  color: #9ca3af;
}

.tm-portfolio-amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fbbf24;
  margin: 2px 0;
}

.tm-pf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid #374151;
  padding-left: 20px;
}

.tm-pf-label { color: #9ca3af; font-size: 0.8rem; }
.tm-pf-main { font-size: 1.05rem; font-weight: 700; margin: 2px 0; }
.tm-pf-sub { font-size: 0.75rem; color: #9ca3af; }

.tm-viewall {
  justify-self: end;
  padding: 10px 18px;
  border: 1px solid #374151;
  border-radius: 8px;
  background: #0f1724;
  color: #fbbf24;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.85rem;
}

.tm-viewall:hover {
  border-color: #f59e0b;
  text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .tm-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
      "list  list"
      "chart order"
      "book  order"
      "pf    pf";
  }

  .tm-list-panel { align-self: start; }
  .tm-list { flex-direction: row; overflow-x: auto; }
  .tm-token-row { flex: 0 0 230px; }
}

@media (max-width: 768px) {
  .tm-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "list"
      "chart"
      "order"
      "book"
      "pf";
  }

  .tm-badge { margin-left: 0; }
  .tm-chart { height: 260px; }
  .tm-book-panel { grid-template-columns: 1fr; gap: 20px; }
  .tm-pf-row { grid-template-columns: 1fr; gap: 12px; }
  .tm-pf-item { border-left: 0; padding-left: 0; }
  .tm-viewall { justify-self: start; }
}
