/* frontend/src/components/AppDialog.css */
.app-dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.app-dialog {
  width: min(440px, 100%);
  background: #111827;
  border: 1px solid #334155;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.app-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1E293B;
}
.app-dialog-header h3 {
  margin: 0;
  font-size: 16px;
  color: #F8FAFC;
}
.app-dialog-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94A3B8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.app-dialog-close:hover {
  background: #1E293B;
  color: #F8FAFC;
}
.app-dialog-body {
  padding: 20px;
}
.app-dialog-message {
  margin: 0;
  color: #E2E8F0;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 20px;
}
.app-dialog-btn {
  min-width: 88px;
  padding: 10px 16px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0F172A;
  color: #E2E8F0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.app-dialog-btn.primary {
  background: #22D3EE;
  border-color: #22D3EE;
  color: #0B0E14;
}
.app-dialog-btn:hover {
  filter: brightness(1.08);
}
.app-dialog-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.app-dialog-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #94A3B8;
  font-size: 13px;
}
.app-dialog-form input {
  padding: 10px 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0B0E14;
  color: #F8FAFC;
  font-size: 15px;
}
.app-dialog-form input:focus {
  outline: none;
  border-color: #22D3EE;
}
.app-dialog-summary {
  padding: 12px;
  border-radius: 8px;
  background: #0B0E14;
  border: 1px solid #1E293B;
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1.7;
}
.app-dialog-summary strong {
  color: #22D3EE;
}
.app-dialog-summary.warn {
  border-color: #EF4444;
  color: #FCA5A5;
}
.app-dialog-summary.warn strong {
  color: #F87171;
}

/* frontend/src/pages/GameList.css */
.game-list-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1E293B;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #F8FAFC;
}
.btn-create {
  padding: 12px 24px;
  background: #22D3EE;
  color: #0B0E14;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-create:hover {
  background: #38BDF8;
  transform: translateY(-2px);
}
.username-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 16px;
  background: #111827;
  border-radius: 8px;
  border: 1px solid #1E293B;
}
.username-input label {
  font-size: 15px;
  color: #F8FAFC;
  font-weight: 500;
}
.username-input input {
  flex: 1;
  max-width: 300px;
  padding: 10px 16px;
  background: #0B0E14;
  border: 1px solid #1E293B;
  border-radius: 6px;
  color: #F8FAFC;
  font-size: 15px;
}
.username-input input:focus {
  outline: none;
  border-color: #22D3EE;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #64748B;
  font-size: 16px;
}
.game-card {
  background: #111827;
  border: 1px solid #1E293B;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
}
.game-card:hover {
  border-color: #22D3EE;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.1);
}
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1E293B;
}
.game-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #F8FAFC;
}
.status-badge {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}
.status-waiting {
  background: rgba(249, 115, 22, 0.15);
  color: #F97316;
}
.status-playing {
  background: rgba(34, 211, 238, 0.15);
  color: #22D3EE;
}
.status-finished {
  background: rgba(100, 116, 139, 0.15);
  color: #64748B;
}
.game-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.info-row .label {
  color: #94A3B8;
  font-size: 14px;
}
.info-row .value {
  color: #F8FAFC;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.btn-join {
  width: 100%;
  padding: 12px;
  background: #22D3EE;
  color: #0B0E14;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-join:hover:not(:disabled) {
  background: #38BDF8;
}
.btn-join:disabled {
  background: #1E293B;
  color: #64748B;
  cursor: not-allowed;
}
.username-hint {
  color: #64748B;
  font-size: 13px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.current-user {
  color: #94A3B8;
  font-size: 14px;
}
.btn-ghost {
  padding: 10px 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: transparent;
  color: #E2E8F0;
  cursor: pointer;
}
@media (max-width: 768px) {
  .game-list-page {
    padding: 16px;
  }
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  .page-header h1 {
    font-size: 20px;
  }
  .header-actions {
    flex-wrap: wrap;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* frontend/src/pages/CreateGame.css */
.create-game-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
}
.create-container {
  width: 100%;
  max-width: 700px;
  background: #111827;
  border: 1px solid #1E293B;
  border-radius: 16px;
  padding: 40px;
}
.create-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1E293B;
}
.btn-back {
  padding: 8px 16px;
  background: transparent;
  color: #94A3B8;
  border: 1px solid #1E293B;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back:hover {
  background: #1E293B;
  color: #F8FAFC;
}
.create-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #F8FAFC;
}
.create-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #F8FAFC;
}
.form-group input {
  padding: 12px 16px;
  background: #0B0E14;
  border: 1px solid #1E293B;
  border-radius: 8px;
  color: #F8FAFC;
  font-size: 15px;
  transition: all 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: #22D3EE;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.btn-cancel,
.btn-submit {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cancel {
  background: #1E293B;
  color: #94A3B8;
}
.btn-cancel:hover {
  background: #334155;
  color: #F8FAFC;
}
.btn-submit {
  background: #22D3EE;
  color: #0B0E14;
}
.btn-submit:hover {
  background: #38BDF8;
  transform: translateY(-2px);
}
.field-hint {
  margin: 0;
  color: #94A3B8;
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .create-game-page {
    padding: 16px;
    align-items: flex-start;
  }
  .create-container {
    padding: 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* frontend/src/pages/TradingRoom.css */
.trading-room {
  width: 100%;
  height: 100vh;
  background: #0B0E14;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Inter",
    "Segoe UI",
    sans-serif;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background:
    linear-gradient(
      135deg,
      #1E293B 0%,
      #0F172A 100%);
  border-bottom: 1px solid #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}
.game-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #F8FAFC;
}
.game-id {
  font-size: 11px;
  color: #94A3B8;
  margin-left: 12px;
  padding: 2px 8px;
  background: #334155;
  border-radius: 4px;
  font-family: "Monaco", monospace;
}
.price-info {
  display: flex;
  gap: 24px;
  align-items: center;
}
.current-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.current-price .label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.current-price .value {
  font-size: 28px;
  font-weight: 700;
  font-family: "SF Mono", monospace;
  letter-spacing: -0.5px;
}
.current-price .value.up {
  color: #22D3EE;
}
.current-price .value.down {
  color: #EF4444;
}
.price-change {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.price-change .change {
  font-size: 16px;
  font-weight: 600;
  font-family: "SF Mono", monospace;
}
.price-change .percent {
  font-size: 14px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: "SF Mono", monospace;
}
.change.up,
.percent.up {
  color: #22D3EE;
  background: rgba(34, 211, 238, 0.1);
}
.change.down,
.percent.down {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}
.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.countdown .label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
}
.countdown .time {
  font-size: 20px;
  font-weight: 700;
  color: #F97316;
  font-family: "SF Mono", monospace;
  padding: 4px 12px;
  background: rgba(249, 115, 22, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(249, 115, 22, 0.3);
}
.btn-start,
.btn-exit {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-start {
  background:
    linear-gradient(
      135deg,
      #22D3EE 0%,
      #06B6D4 100%);
  color: #0B0E14;
}
.btn-start:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.4);
}
.btn-exit {
  background: #334155;
  color: #F8FAFC;
}
.btn-exit:hover {
  background: #475569;
}
.main-content {
  display: grid;
  grid-template-columns: 1fr 380px 340px;
  gap: 1px;
  flex: 1;
  overflow: hidden;
  background: #1E293B;
}
.chart-panel,
.orderbook-panel,
.trading-panel {
  background: #0F172A;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-header {
  padding: 12px 16px;
  background: #1E293B;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #F8FAFC;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chart-container {
  flex: 1;
  min-height: 360px;
  position: relative;
  background: #0B0E14;
}
.orderbook {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.orderbook-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 16px;
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: #1E293B;
}
.sell-orders,
.buy-orders {
  flex: 1;
  overflow-y: auto;
}
.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px 16px;
  font-size: 13px;
  position: relative;
  font-family: "SF Mono", monospace;
}
.order-row.sell .price {
  color: #EF4444;
}
.order-row.buy .price {
  color: #22D3EE;
}
.order-row .amount {
  text-align: right;
  color: #94A3B8;
}
.depth-bar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  opacity: 0.15;
  z-index: 0;
}
.order-row.sell .depth-bar {
  background: #EF4444;
}
.order-row.buy .depth-bar {
  background: #22D3EE;
}
.current-price-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: 2px 0;
  background: rgba(34, 211, 238, 0.05);
  border-top: 1px solid #334155;
  border-bottom: 1px solid #334155;
  font-family: "SF Mono", monospace;
}
.current-price-bar.up {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.3);
}
.current-price-bar.down {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}
.current-price-bar .price {
  font-size: 16px;
  font-weight: 700;
  color: #F8FAFC;
}
.current-price-bar .change {
  font-size: 13px;
  font-weight: 600;
}
.current-price-bar.up .change {
  color: #22D3EE;
}
.current-price-bar.down .change {
  color: #EF4444;
}
.trading-panel {
  padding: 16px;
}
.order-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.order-type-tabs button {
  padding: 12px;
  border: 1px solid #334155;
  background: #1E293B;
  color: #94A3B8;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.order-type-tabs button.buy.active {
  background:
    linear-gradient(
      135deg,
      #22D3EE 0%,
      #06B6D4 100%);
  color: #0B0E14;
  border-color: #22D3EE;
}
.order-type-tabs button.sell.active {
  background:
    linear-gradient(
      135deg,
      #EF4444 0%,
      #DC2626 100%);
  color: #FFFFFF;
  border-color: #EF4444;
}
.order-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input {
  padding: 12px;
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #F8FAFC;
  font-size: 14px;
  font-family: "SF Mono", monospace;
  transition: all 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: #22D3EE;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.btn-submit {
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
.btn-submit.buy {
  background:
    linear-gradient(
      135deg,
      #22D3EE 0%,
      #06B6D4 100%);
  color: #0B0E14;
}
.btn-submit.buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
}
.btn-submit.sell {
  background:
    linear-gradient(
      135deg,
      #EF4444 0%,
      #DC2626 100%);
  color: #FFFFFF;
}
.btn-submit.sell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}
.my-assets {
  margin-top: 24px;
  padding: 16px;
  background: #1E293B;
  border-radius: 8px;
  border: 1px solid #334155;
}
.my-assets h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.asset-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asset-item .label {
  font-size: 11px;
  color: #64748B;
}
.asset-item .value {
  font-size: 15px;
  font-weight: 700;
  color: #F8FAFC;
  font-family: "SF Mono", monospace;
}
.asset-item .value.total {
  color: #22D3EE;
  font-size: 17px;
}
.bottom-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #1E293B;
  height: 220px;
  border-top: 1px solid #334155;
}
.trades-panel,
.ranking-panel {
  background: #0F172A;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trades-list,
.ranking-list {
  flex: 1;
  overflow-y: auto;
}
.trades-header,
.ranking-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 16px;
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: #1E293B;
  border-bottom: 1px solid #334155;
}
.trade-row,
.ranking-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 16px;
  font-size: 13px;
  font-family: "SF Mono", monospace;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}
.trade-row:hover,
.ranking-row:hover {
  background: rgba(30, 41, 59, 0.5);
}
.trade-row .time {
  color: #94A3B8;
  font-size: 12px;
}
.trade-row .price.up {
  color: #22D3EE;
}
.trade-row .price.down {
  color: #EF4444;
}
.trade-row .amount {
  text-align: right;
  color: #F8FAFC;
}
.ranking-row.me {
  background: rgba(34, 211, 238, 0.1);
  border-left: 3px solid #22D3EE;
}
.ranking-row .rank {
  color: #F97316;
  font-weight: 700;
}
.ranking-row .name {
  color: #F8FAFC;
}
.ranking-row .assets {
  text-align: right;
  color: #22D3EE;
  font-weight: 600;
}
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #0B0E14;
  color: #22D3EE;
  font-size: 18px;
  font-weight: 600;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #1E293B;
}
::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}
.turnover-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 88px;
}
.turnover-info .label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.turnover-info .value {
  font-size: 18px;
  font-weight: 700;
  color: #F8FAFC;
  font-family: "SF Mono", monospace;
}
@media (max-width: 1400px) {
  .main-content {
    grid-template-columns: 1fr 320px 300px;
  }
}
.drawer-close,
.trade-dock,
.trade-drawer-mask {
  display: none;
}
@media (max-width: 900px) {
  .trading-room {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) minmax(132px, 26vh) 72px auto;
    grid-template-areas: "header header" "chart book" "chart ticks" "rank rank" "dock dock";
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }
  .top-bar {
    grid-area: header;
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "title start exit" "price price meta";
    gap: 4px 8px;
    padding: 8px 10px;
    align-items: center;
  }
  .game-title {
    grid-area: title;
    min-width: 0;
  }
  .game-title h2 {
    font-size: 16px;
    line-height: 1.2;
  }
  .game-id {
    display: none;
  }
  .price-info {
    grid-area: price;
    width: auto;
    gap: 8px;
    align-items: baseline;
  }
  .current-price {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .current-price .label {
    display: none;
  }
  .current-price .value {
    font-size: 26px;
    line-height: 1;
  }
  .price-change {
    gap: 6px;
  }
  .price-change .change,
  .price-change .percent {
    font-size: 13px;
    padding: 2px 6px;
  }
  .turnover-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    grid-area: meta;
    min-width: auto;
  }
  .turnover-info .label {
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
  }
  .turnover-info .value {
    font-size: 13px;
  }
  .game-status {
    grid-area: start;
  }
  .countdown {
    flex-direction: row;
    gap: 6px;
    align-items: center;
  }
  .countdown .label {
    display: none;
  }
  .countdown .time {
    font-size: 16px;
    padding: 2px 8px;
  }
  .btn-start,
  .btn-exit {
    padding: 6px 12px;
    font-size: 13px;
  }
  .btn-exit {
    grid-area: exit;
  }
  .main-content {
    display: contents;
  }
  .chart-panel {
    grid-area: chart;
    min-height: 0;
  }
  .chart-container {
    min-height: 0;
    height: auto;
  }
  .orderbook-panel {
    grid-area: book;
    min-height: 0;
  }
  .bottom-panels {
    display: contents;
    height: auto;
  }
  .trades-panel {
    grid-area: ticks;
    min-height: 0;
    border-top: 1px solid #1E293B;
  }
  .ranking-panel {
    grid-area: rank;
    min-height: 0;
    border-top: 1px solid #334155;
  }
  .trading-panel {
    display: none;
  }
  .trading-panel.drawer-open {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    max-height: 78dvh;
    min-height: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }
  .drawer-close {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: transparent;
    color: #E2E8F0;
    font-size: 13px;
  }
  .trade-drawer-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 45;
  }
  .trade-dock {
    grid-area: dock;
    display: flex;
    position: static;
    gap: 10px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: #0F172A;
    border-top: 1px solid #334155;
    z-index: 30;
  }
  .dock-buy,
  .dock-sell {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
  }
  .dock-buy {
    background: #22D3EE;
    color: #0B0E14;
  }
  .dock-sell {
    background: #EF4444;
    color: #fff;
  }
  .panel-header {
    padding: 8px 10px;
  }
  .panel-header h3 {
    font-size: 12px;
  }
  .orderbook-header,
  .trades-header,
  .ranking-header {
    padding: 6px 10px;
  }
  .order-row,
  .trade-row,
  .ranking-row {
    padding: 6px 10px;
    font-size: 12px;
  }
}
.chart-container a,
.chart-container #tv-attr-logo,
.tv-lightweight-charts a {
  display: none !important;
}
.quick-sizes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.quick-sizes button {
  padding: 8px 0;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1E293B;
  color: #E2E8F0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.quick-sizes button:hover {
  border-color: #22D3EE;
  color: #22D3EE;
}
.my-pendings {
  margin-top: 16px;
  padding: 12px;
  background: #1E293B;
  border-radius: 8px;
  border: 1px solid #334155;
}
.my-pendings h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: #94A3B8;
}
.pending-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #334155;
  font-size: 13px;
  color: #E2E8F0;
}
.pending-row.buy span:first-child {
  color: #22D3EE;
}
.pending-row.sell span:first-child {
  color: #EF4444;
}
.pending-row button {
  padding: 6px 10px;
  border: 1px solid #EF4444;
  border-radius: 6px;
  background: transparent;
  color: #FCA5A5;
  font-size: 12px;
  cursor: pointer;
}

/* frontend/src/pages/Auth.css */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: #111827;
  border: 1px solid #1E293B;
  border-radius: 16px;
  padding: 32px 28px;
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #F8FAFC;
}
.auth-card p {
  margin: 0 0 24px;
  color: #94A3B8;
  font-size: 14px;
}
.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  color: #94A3B8;
  font-size: 13px;
}
.auth-card input {
  padding: 12px 14px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0B0E14;
  color: #F8FAFC;
  font-size: 15px;
}
.auth-card input:focus {
  outline: none;
  border-color: #22D3EE;
}
.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #22D3EE;
  color: #0B0E14;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.auth-switch {
  margin-top: 18px;
  text-align: center;
  color: #94A3B8;
  font-size: 14px;
}
.auth-switch button {
  border: none;
  background: none;
  color: #22D3EE;
  cursor: pointer;
  font-size: 14px;
}
@media (max-width: 768px) {
  .auth-page {
    padding: 16px;
  }
  .auth-card {
    padding: 24px 18px;
  }
}

/* frontend/src/pages/Records.css */
.records-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
}
.records-list {
  background: #111827;
  border: 1px solid #1E293B;
  border-radius: 12px;
  overflow: hidden;
}
.records-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr 1.1fr 0.8fr 1.3fr;
  gap: 12px;
  padding: 14px 18px;
  color: #E2E8F0;
  border-top: 1px solid #1E293B;
  font-size: 14px;
}
.records-row.head {
  border-top: none;
  color: #94A3B8;
  background: #0F172A;
  font-size: 13px;
}
.records-row .up {
  color: #22D3EE;
}
.records-row .down {
  color: #EF4444;
}
@media (max-width: 768px) {
  .records-page {
    padding: 16px;
  }
  .records-list {
    overflow-x: auto;
  }
  .records-row {
    min-width: 720px;
  }
}

/* frontend/src/App.css */
.app {
  width: 100%;
  min-height: 100vh;
}

/* frontend/src/index.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #0B0E14;
  color: #F8FAFC;
  line-height: 1.6;
}
#root {
  width: 100%;
  min-height: 100vh;
}
html {
  -webkit-text-size-adjust: 100%;
}
input,
button,
select,
textarea {
  font-size: 16px;
}
