﻿/* Lottery Platform CSS */

body {
  background-color: #f8f9fa;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ticket display */
.ticket-card {
  border: 2px solid #0d6efd;
  border-radius: 8px;
}

/* Countdown timer */
#countdown {
  font-size: 1.2rem;
  font-family: monospace;
}

/* Status badges */
.status-pending { background-color: #0d6efd; }
.status-assigned { background-color: #ffc107; color: #000; }
.status-completed { background-color: #198754; }
.status-revoked { background-color: #dc3545; }
.status-expired { background-color: #6c757d; }

/* Table improvements */
.table th {
  white-space: nowrap;
}

/* File drop zone */
.drop-zone {
  border: 2px dashed #6c757d;
  border-radius: 8px;
  transition: border-color 0.2s;
}
.drop-zone:hover {
  border-color: #0d6efd;
}

/* Spinner overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Pool stats cards */
.pool-stat-card {
  transition: transform 0.2s;
}
.pool-stat-card:hover {
  transform: translateY(-2px);
}

/* 手机端适配 */
@media (max-width: 768px) {
  .container-fluid {
    padding: 8px;
  }
  .card-body {
    padding: 0.75rem;
  }

  .navbar .nav-link {
    font-size: 0.85rem;
    padding: 0.25rem 0.4rem;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
  /* 绁ㄩ潰娓叉煋閫傞厤 */
  .ticket-render table {
    font-size: 0.85rem;
  }

  .btn-mobile-lg {
    font-size: 1.1rem;
    padding: 0.6rem 1.5rem;
    min-height: 48px;
  }

  .fs-4 { font-size: 1.1rem !important; }
}

/* 鎺ュ崟涓绘寜閽?鈥?澶у昂瀵?*/
.btn-start-receiving {
  font-size: 1.3rem;
  font-weight: bold;
  padding: 0.75rem 2.5rem;
  min-height: 56px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

/* ticket-render 表格 */
.ticket-render .table td {
  padding: 0.2rem 0.4rem;
  vertical-align: middle;
}





/* 全屏容器 - 铺满整个卡片区域 */
.mode-a-fullscreen-container {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 280px);
  min-height: 360px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}


.mode-a-info-bar {
  flex-shrink: 0;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mode-a-info-bar .info-left,
.mode-a-info-bar .info-center,
.mode-a-info-bar .info-right {
  flex: 1;
  color: #fff;
}

.mode-a-info-bar .info-left {
  text-align: left;
  font-size: 1rem;
}

.mode-a-info-bar .info-center {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.mode-a-info-bar .info-amount {
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.15rem;
  color: rgba(255,255,255,0.95);
}

.mode-a-info-bar .info-right {
  text-align: right;
}

.countdown-text {
  font-size: 1.3rem !important;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  color: #fff !important;
  font-weight: 700;
}

.deadline-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  margin-top: 0.1rem;
}

.mode-a-label {
  font-size: 0.72rem;
  margin-right: 0.2rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}


.mode-a-main-area {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 0;
  background: #f8f9fa;
  gap: 0.4rem;
  padding: 0.35rem;
  overflow: hidden;
}

/* 宸﹀彸涓や晶鎸夐挳 */
.mode-a-side-btn {
  flex-shrink: 0;
  width: 44px;
  min-width: 44px;
  height: auto;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid #dee2e6;
  border-radius: 10px;
  color: #667eea;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0;
}

.mode-a-side-btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.2);
}

.mode-a-side-btn:active:not(:disabled) {
  background: rgba(102, 126, 234, 0.3);
}

.mode-a-side-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.mode-a-side-btn-left {
  border-right-color: #dee2e6;
}

.mode-a-side-btn-right {
  border-left-color: #dee2e6;
}

/* 绁ㄩ潰婊氬姩鍖哄煙 - 鍗犳嵁鍓╀綑绌洪棿 */
.mode-a-ticket-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem;
}

.mode-a-side-hint {
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #4f63c4;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  user-select: none;
}


.mode-a-bottom-bar {
  flex-shrink: 0;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 2px solid #e9ecef;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.mode-a-stop-btn {
  font-size: 1rem !important;
  font-weight: 600;
  padding: 0.6rem !important;
  border-radius: 8px;
}

.history-dot {
  width: 8px;
  height: 8px;
  transition: all 0.2s;
}

.history-dot-active {
  background: #0d6efd;
  transform: scale(1.12);
}

.history-dot-filled {
  background: #6c757d;
}

.history-dot-empty {
  background: #e9ecef;
  border: 1px solid #ced4da;
}



.ticket-render .match-card {
  margin-bottom: 0.35rem !important;
}

.ticket-render .match-header {
  padding: 0.3rem 0.5rem !important;
  font-size: 0.85rem !important;
}

.ticket-render .match-body {
  padding: 0.3rem 0.5rem !important;
}


.ticket-render .match-number {
  font-size: 0.9rem !important;
}


.ticket-render .ticket-badge {
  padding: 0.2em 0.45em !important;
  margin: 0.1rem !important;
  font-size: 0.85rem !important;
}

/* 绁ㄩ潰澶村熬鍖哄煙绱у噾鍖?*/
.ticket-render .ticket-header {
  padding: 0.4rem 0.6rem !important;
}

.ticket-render .ticket-footer {
  padding: 0.4rem 0.6rem !important;
  font-size: 0.95rem !important;
}

/* 琛ㄦ牸琛岄珮鍘嬬缉 */
.ticket-render .table td,
.ticket-render .table th {
  padding: 0.15rem 0.35rem !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
}


@media (max-width: 768px) {
  .mode-a-fullscreen-container {
    height: calc(100dvh - 250px);
    min-height: 350px;
  }

  .mode-a-info-bar {
    padding: 0.5rem 0.75rem;
  }

  .countdown-text {
    font-size: 1.1rem !important;
  }

  .mode-a-side-btn {
    width: 38px;
    min-width: 38px;
    height: auto;
    font-size: 1.35rem;
  }

  .mode-a-ticket-scroll {
    padding: 0.4rem;
  }


  .mode-a-ticket-scroll .ticket-render {
    font-size: 0.9rem;
  }


  .ticket-render .match-card {
    margin-bottom: 0.25rem !important;
  }

  .ticket-render .match-header {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.8rem !important;
  }

  .ticket-render .ticket-badge {
    font-size: 0.8rem !important;
    padding: 0.15em 0.4em !important;
  }
}

/* 灏忓睆鎵嬫満锛?375px锛?*/
@media (max-width: 375px) {
  .mode-a-fullscreen-container {
    height: calc(100dvh - 220px);
    min-height: 320px;
  }

  .countdown-text {
    font-size: 1rem !important;
  }

  .mode-a-side-btn {
    width: 34px;
    min-width: 34px;
    height: auto;
    font-size: 1.2rem;
  }

  .ticket-render .match-header {
    font-size: 0.78rem !important;
  }

  .ticket-render .ticket-badge {
    font-size: 0.78rem !important;
  }
}


body.mode-a-active {
  overflow: hidden;
}


body.mode-a-active .row.g-3,
body.mode-a-active .client-announcement-card,
body.mode-a-active .client-device-stats,
body.mode-a-active .client-quick-links {
  display: none !important;
}

body.mode-a-active #mode-a {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  display: flex;
  flex-direction: column;
}

body.mode-a-active #mode-a .card-header {
  flex-shrink: 0;
  border-radius: 0;
}

body.mode-a-active #mode-a .card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
}

body.mode-a-active .mode-a-fullscreen-container {
  flex: 1;
  height: auto;
  max-height: none;
  min-height: 0;
  border-radius: 0;
}

@media (max-width: 768px) {
  .mode-a-fullscreen-container {
    height: calc(100dvh - 220px);
    min-height: 280px;
  }

  body.mode-a-active #mode-a {
    top: 52px;
  }

  body.mode-a-active #mode-a .card-body {
    padding: 0.25rem;
  }
}

@media (max-width: 375px) {
  body.mode-a-active #mode-a {
    top: 50px;
  }
}

/* 鈹€鈹€ 绁ㄩ潰娓叉煋鍝嶅簲寮忎紭鍖?鈹€鈹€ */

.ticket-render .ticket-type {
  font-size: 1.3rem;
  font-weight: bold;
}

.ticket-render .ticket-amount {
  font-size: 1rem;
  opacity: 0.95;
}

.ticket-render .match-number {
  font-size: 1.15rem;
}

.ticket-render .ticket-badge {
  font-size: 1.1rem;
  padding: 0.4em 0.7em;
  margin: 0.2rem !important;
}

.ticket-render .ticket-footer {
  font-size: 1.2rem;
  font-weight: bold;
}

.ticket-render .match-card {
  margin-bottom: 0.75rem !important;
}


@media (max-width: 768px) {
  .ticket-render .ticket-type {
    font-size: 1.2rem;
  }

  .ticket-render .ticket-amount {
    font-size: 0.95rem;
  }

  .ticket-render .match-number {
    font-size: 1.05rem;
  }

  .ticket-render .ticket-badge {
    font-size: 1rem;
    padding: 0.35em 0.6em;
    margin: 0.2rem !important;
  }

  .ticket-render .ticket-footer {
    font-size: 1.1rem;
  }

  .ticket-render .match-card {
    margin-bottom: 0.6rem !important;
  }

  .ticket-render .ticket-header,
  .ticket-render .ticket-footer {
    padding: 0.75rem !important;
  }

  .ticket-render .match-header {
    padding: 0.6rem !important;
  }
}

/* 灏忓睆鎵嬫満锛?375px锛? 淇濇寔娓呮櫚 */
@media (max-width: 375px) {
  .ticket-render .ticket-type {
    font-size: 1.1rem;
  }

  .ticket-render .ticket-amount {
    font-size: 0.9rem;
  }

  .ticket-render .match-number {
    font-size: 1rem;
  }

  .ticket-render .ticket-badge {
    font-size: 0.95rem;
    padding: 0.3em 0.55em;
    margin: 0.15rem !important;
  }

  .ticket-render .ticket-footer {
    font-size: 1.05rem;
  }

  .ticket-render .match-card {
    margin-bottom: 0.5rem !important;
  }

  .ticket-render .ticket-header,
  .ticket-render .ticket-footer {
    padding: 0.6rem !important;
  }

  .ticket-render .match-header {
    padding: 0.5rem !important;
  }
}
