/* ===================================
   CK Ticket - Notion Style + Orange
   =================================== */

:root {
  --orange: #F97316;
  --orange-hover: #EA580C;
  --orange-light: #FFF7ED;
  --orange-bg: #FEF3C7;
  --black: #191919;
  --gray-900: #1F2937;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;
  --white: #FFFFFF;
  --green: #10B981;
  --red: #EF4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--orange);
}

.nav-link {
  font-size: 15px;
  color: var(--gray-500);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--black);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 语言切换 */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-700);
  transition: border-color 0.2s;
}

.lang-btn:hover {
  border-color: var(--gray-500);
}

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: 8px 0;
  z-index: 200;
}

.lang-dropdown.active {
  display: block;
}

.lang-dropdown-header {
  padding: 8px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  font-weight: 600;
}

.lang-option {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-option:hover {
  background: var(--gray-50);
}

.lang-option.active {
  color: var(--orange);
  font-weight: 500;
}

.lang-option .code {
  color: var(--gray-400);
  font-size: 12px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-hover);
}

.btn-outline {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  border-radius: 20px;
  font-size: 13px;
  padding: 8px 16px;
}

.btn-outline:hover {
  border-color: var(--gray-400);
  color: var(--gray-700);
}

.btn-lg {
  padding: 12px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

/* ===== Hero / Banner ===== */
.hero {
  position: relative;
  background: var(--black);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/static/img/hero-bg.jpg') center top / cover no-repeat fixed;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.55) 0%,
    rgba(2, 6, 23, 0.7) 60%,
    rgba(2, 6, 23, 0.85) 100%
  );
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--orange);
}

.search-box {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  background: var(--white);
  color: var(--black);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.search-box input::placeholder {
  color: var(--gray-400);
}

.search-box .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 20px;
  cursor: pointer;
}
.search-box .search-icon:hover {
  color: var(--orange);
}

/* ===== 分类区域 ===== */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 16px;
}

/* 城市卡片网格 */
.city-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.city-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.city-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.city-card:hover img {
  transform: scale(1.08);
}

.city-card .city-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}

/* 赛事阶段标签 */
.stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.12);
}

.stage-tag:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(237,137,54,0.3);
}

/* Browse区域深色背景 */
.browse-section {
  position: relative;
  background: #1a1a2e;
  color: var(--white);
  padding: 48px 0 56px;
  overflow: hidden;
}

.browse-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/static/img/hero-bg.jpg') center top / cover no-repeat fixed;
  z-index: 0;
}

.browse-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  z-index: 1;
}

.browse-section > .container {
  position: relative;
  z-index: 2;
}

.browse-section .section-title {
  color: var(--white);
}

.browse-section .section-label {
  color: var(--orange);
}

/* 比赛卡片网格 */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.match-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: rgba(255,255,255,0.08);
}

.match-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}

.match-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.match-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-card-date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
}

.match-card-btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: var(--white);
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.match-card:hover .match-card-btn {
  opacity: 1;
}

.match-card-info {
  padding: 16px;
}

.match-card-teams {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--white);
}

.match-card-venue {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.match-card-time {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ===== 赛事列表页 ===== */
.filters-bar {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  outline: none;
  min-width: auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.filter-select:hover {
  border-color: var(--gray-400);
}

.filter-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(249,115,22,0.1);
}

.filter-search-wrap {
  flex: 1;
  position: relative;
}
.filter-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
}
.filter-search-icon:hover {
  color: var(--orange);
}
.filter-search {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.filter-search:focus {
  border-color: var(--orange);
}

/* 比赛列表卡片 */
.event-card {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
  background: var(--white);
}

.event-card:hover {
  box-shadow: var(--shadow);
}

.event-date {
  min-width: 80px;
  text-align: center;
  padding-right: 20px;
  border-right: 1px solid var(--gray-200);
}

.event-date .month {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
}

.event-date .day {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.event-date .weekday {
  font-size: 12px;
  color: var(--gray-500);
}

.event-date .time {
  font-size: 12px;
  color: var(--gray-500);
}

.event-info {
  flex: 1;
  padding: 0 20px;
}

.event-teams {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.event-venue {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 12px;
}

.event-stage-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 12px;
  color: var(--gray-700);
  margin-top: 6px;
}

.event-action {
  min-width: 140px;
  text-align: right;
}

/* ===== 选票页 ===== */
.ticket-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
}

.ticket-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-match-info h2 {
  font-size: 18px;
  font-weight: 600;
}

.ticket-match-info p {
  font-size: 13px;
  color: var(--gray-500);
}

.ticket-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px 0;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s;
  cursor: pointer;
}

.ticket-item:hover {
  border-color: var(--orange);
}

.ticket-item-left h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.ticket-item-left .cat {
  font-size: 13px;
  color: var(--gray-500);
}

.ticket-item-left .delivery {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  margin-top: 4px;
}

.ticket-item-left .desc {
  font-size: 12px;
  color: var(--gray-400);
}

.ticket-item-right {
  text-align: right;
}

.ticket-item-right .price {
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
}

.ticket-item-right .price-note {
  font-size: 11px;
  color: var(--gray-400);
}

/* 座位图 */
.seat-map {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 400px;
  align-self: start;
}

/* ===== Shipping 页 ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 40px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* 订单摘要 */
.order-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 88px;
}

.order-summary h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  color: var(--gray-700);
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 2px solid var(--gray-300);
}

.order-total .amount {
  color: var(--orange);
}

/* 步骤导航 */
.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 14px;
  color: var(--gray-400);
}

.steps .step.active {
  color: var(--orange);
  font-weight: 600;
}

.steps .step.done {
  color: var(--green);
}

.steps .sep {
  color: var(--gray-300);
}

/* ===== 登录/注册 ===== */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-card .auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--gray-500);
}

.auth-card .auth-link a {
  color: var(--orange);
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 40px 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--gray-500);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-400);
}

.footer-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--gray-400);
}

/* ===== 紧迫感/社交证明 ===== */
.selling-fast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--orange-light);
  border: 1px solid #FED7AA;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--orange-hover);
  font-weight: 500;
}

.social-proof {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  max-width: 320px;
  z-index: 500;
  display: none;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.social-proof .sp-name {
  font-weight: 600;
}

.social-proof .sp-time {
  color: var(--gray-400);
  font-size: 11px;
  margin-top: 2px;
}

/* ===== 静态页面 ===== */
.page-hero {
  background: var(--gray-900);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 700;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
  line-height: 1.8;
}

.page-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 8px;
}

.page-content p {
  margin-bottom: 16px;
  color: var(--gray-700);
}

/* ===== 响应式 ===== */
/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 8px 24px 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-link {
  padding: 12px 0;
  font-size: 15px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.mobile-menu-link:last-child { border-bottom: none; }
.mobile-menu-link:hover { color: var(--orange); }

@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .match-grid { grid-template-columns: 1fr; }
  .ticket-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .event-card { flex-direction: column; text-align: center; gap: 12px; }
  .event-date { border-right: none; border-bottom: 1px solid var(--gray-200); padding: 0 0 12px; }
  .event-action { min-width: auto; }
  .filters-bar { flex-wrap: wrap; }
  .hamburger { display: flex; }
  .navbar-right { display: none; }
  .nav-desktop { display: none; }
  .page-content { padding: 24px 16px; }
  .footer-content { flex-direction: column; gap: 16px; }
  .footer-links { flex-wrap: wrap; gap: 12px; }
}

/* ===== 工具类 ===== */
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-gray { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none; }
