/* =========================================
   SEATGEEK CLONE STYLES
   ========================================= */

:root {
  --bg-main: #ffffff;
  --bg-card: #f2f2f7;
  --bg-dark: #121212;
  --text-primary: #000000;
  --text-secondary: #8e8e93;
  --text-dark-primary: #ffffff;
  --text-dark-secondary: #a1a1aa;
  --accent-red: #ff3b30;
  --accent-blue: #007aff;
  --font-app: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-height: 84px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-app);
  background: var(--bg-main);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* --- Views System --- */
.view {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-main);
  z-index: 10;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
}
.view.active {
  visibility: visible;
  opacity: 1;
  z-index: 20;
}
.view.slide-up {
  transform: translateY(100%);
  visibility: visible;
  opacity: 1;
}
.view.slide-up.active {
  transform: translateY(0);
}
.view.dark-bg {
  background: #0f0f11;
  color: var(--text-dark-primary);
}

/* --- Top Bar (Tickets List) --- */
.top-bar {
  padding: 54px 20px 16px;
  background: var(--bg-main);
  z-index: 30;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #f2f2f7;
}
.top-bar h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.top-bar-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}
.top-bar-actions span { color: #8e8e93; cursor: pointer; }
.top-bar-actions span:first-child { color: var(--text-primary); border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: -9px; }
.icon-more { margin-left: auto; letter-spacing: 2px; color: #000 !important; font-size: 20px;}

/* --- Scrollable Content --- */
.content-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 calc(var(--nav-height) + 20px);
}
.content-scrollable::-webkit-scrollbar { display: none; }

/* --- Info Card --- */
.info-card {
  background: #ffffff;
  color: #000;
  border-radius: 16px;
  padding: 16px;
  margin: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.info-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.bell-icon { color: #000; flex-shrink: 0; }
.close-icon { color: #888; font-size: 16px; cursor: pointer; padding: 4px; }
.btn-outline {
  background: transparent;
  border: 1px solid #e5e5ea;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
}

/* --- Ticket List Card --- */
#tickets-container {
  padding: 0 20px;
}
.ticket-list-card {
  position: relative;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  cursor: pointer;
  background: #000;
}
.card-bg { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.9) 100%);
}
.card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  color: white;
}
.card-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.card-subtitle { font-size: 16px; color: #e5e5ea; margin-bottom: 4px; font-weight: 500;}
.card-venue { font-size: 15px; color: #aeaeb2; font-weight: 500;}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  padding: 10px 10px 30px;
  border-top: 1px solid #f2f2f7;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #8e8e93;
  text-decoration: none;
  width: 60px;
}
.nav-item.active { color: var(--accent-red); }
.nav-item.active .nav-icon {
  background: rgba(255, 59, 48, 0.1);
  border-radius: 20px;
  padding: 4px 16px;
  margin: -4px -16px 0;
}
.nav-icon { font-size: 24px; display:flex; align-items:center; justify-content:center; }
.nav-item span { font-size: 10px; font-weight: 600; margin-top:2px; }

/* =========================================
   VIEW 2: EVENT DETAIL
   ========================================= */
#view-event-detail { 
  overflow-y: auto; 
  background: #1c1c1e;
  color: white;
}
#view-event-detail::-webkit-scrollbar { display: none; }
.event-hero {
  position: relative;
  height: 55vh;
  min-height: 400px;
  overflow: hidden;
}
.hero-bg { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transform-origin: center top; }
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,28,30,0) 0%, rgba(28,28,30,0.5) 50%, #1c1c1e 100%);
}
.hero-top-nav {
  position: absolute;
  top: 54px; left: 20px; right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}
.btn-pill {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
}
.btn-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  color: white;
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.hero-details {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px;
  text-align: center;
  z-index: 10;
}
.hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero-date { font-size: 16px; color: #e5e5ea; margin-bottom: 4px; font-weight: 500;}
.hero-venue { font-size: 16px; color: #aeaeb2; }

.event-actions {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 24px 20px;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.action-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.action-btn:active .action-icon { transform: scale(0.95); }
.action-btn span { font-size: 14px; font-weight: 500; color: white;}
.action-btn.disabled .action-icon { background: #2c2c2e; opacity: 0.7;}
.action-btn.disabled span { color: #8e8e93; }

.share-card {
  margin: 0 20px 20px;
  background: #ffffff;
  color: #000;
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.share-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px dashed #d1d1d6;
  display: flex; align-items: center; justify-content: center;
  color: #aeaeb2;
  font-weight: 700;
  font-size: 20px;
}
.share-info { flex: 1; }
.share-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.share-info p { font-size: 14px; color: #8e8e93; font-weight: 500;}
.btn-share {
  background: #000;
  color: #fff;
  border-radius: 50px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  display: flex; gap: 8px; align-items: center;
}

.stadium-card {
  margin: 0 20px 40px;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  color: #000;
}
.stadium-img { width: 100%; height: 160px; object-fit: cover; }
.stadium-info { padding: 20px; }
.stadium-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.stadium-info p { font-size: 15px; color: #555; }

/* =========================================
   VIEW 2.5: TICKETS BOTTOM SHEET
   ========================================= */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
}
.sheet-content {
  position: relative;
  background: white;
  border-radius: 24px 24px 0 0;
  height: 70vh;
  display: flex;
  flex-direction: column;
  z-index: 45;
}
.sheet-header {
  position: relative;
  text-align: center;
  padding: 12px 20px 16px;
  border-bottom: 1px solid #f2f2f7;
}
.sheet-handle {
  width: 40px; height: 5px;
  background: #e5e5ea;
  border-radius: 4px;
  margin: 0 auto 16px;
}
.sheet-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #f2f2f7;
  color: #000;
  border: none;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
  cursor: pointer;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-ticket-card {
  display: flex;
  align-items: center;
  border: 1px solid #e5e5ea;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  background: white;
  cursor: pointer;
}
.st-icon-wrap {
  width: 52px; height: 52px;
  background: #ff4d42;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}
.st-info {
  flex: 1;
}
.st-section {
  font-size: 17px; font-weight: 700; color: #000; margin-bottom: 4px;
}
.st-row {
  font-size: 15px; color: #8e8e93;
}
.st-extra {
  font-size: 12px; color: #8e8e93; text-transform: uppercase; margin-top: 6px; font-weight: 600;
}

/* =========================================
   VIEW 3: TICKET MODAL
   ========================================= */
#view-ticket-modal { 
  display: flex; 
  flex-direction: column; 
}
.ticket-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 54px 20px 20px;
}
.ticket-header-text { flex: 1; padding-right: 20px; }
.ticket-header-text h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.ticket-header-text p { font-size: 14px; color: var(--text-dark-secondary); }
.btn-circle.small { width: 32px; height: 32px; background: rgba(255,255,255,0.15); }

.ticket-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}
.ticket {
  width: 100%;
  max-width: 350px;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  color: #000;
  text-align: center;
}
.ticket-top {
  background: #e5e5ea;
  height: 300px;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.wallet-graphic {
  width: 220px; height: 220px;
  background: #ffffff;
  border-radius: 40px;
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}
.wallet-svg-line {
  stroke-dasharray: 100 505;
  animation: rotateLine 3s linear infinite;
}
@keyframes rotateLine {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -605; }
}
.saved-badge {
  background: #8e8e93;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.info-icon {
  position: absolute;
  top: 20px; right: 20px;
  width: 24px; height: 24px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: 700;
}
.ticket-bottom { padding: 30px 20px 40px; }
.entry-info { font-size: 15px; margin-bottom: 20px; line-height: 1.5; color: #333;}
.section-text { font-size: 34px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.seat-info { font-size: 16px; color: #555; font-weight: 600; }

.ticket-footer {
  padding: 20px;
}
.btn-primary {
  width: 100%;
  background: #333333;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 18px;
  font-size: 17px;
  font-weight: 600;
}

/* =========================================
   VIEW 4: ME (PROFILE)
   ========================================= */
.me-top-bar {
  padding: 54px 20px 16px;
  text-align: center;
  background: white;
}
.me-top-bar h1 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0;
  color: #000;
}

.profile-header {
  display: flex;
  align-items: center;
  padding: 16px 20px 30px;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #f2f2f7;
  display: flex; align-items: center; justify-content: center;
  color: #8e8e93;
  margin-right: 16px;
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: #000; }
.profile-info p { font-size: 15px; color: #8e8e93; }

.info-card.light-gray {
  background: #f2f2f7;
  box-shadow: none;
  margin-bottom: 30px;
}

.settings-group-title {
  font-size: 17px;
  font-weight: 700;
  margin: 30px 0 10px;
  color: #000;
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f2f2f7;
  cursor: pointer;
}
.settings-item.no-border { border-bottom: none; }
.settings-label { font-size: 16px; color: #000; display: flex; align-items: center; font-weight: 600; }
.settings-value { font-size: 16px; color: #8e8e93; display: flex; align-items: center; gap: 8px; font-weight: 500;}
.settings-value.red { color: var(--accent-red); }

/* Update active state in ticket modal */
.slide-up {
  z-index: 50;
}

/* =========================================
   ADMIN & TRANSFER UI
   ========================================= */
.admin-input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #d1d1d6;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.admin-input:focus {
  border-color: #000;
}
.admin-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f2f2f7;
}
.btn-delete {
  background: var(--accent-red);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}
