:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1e1e1e;
  --surface-3: #2a2a2a;
  --text: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #ff3b5c;
  --accent-2: #00c06b;
  --accent-3: #f5c542;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 920px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

@media (min-width: 420px) {
  .app-container {
    height: 90vh;
    border-radius: 24px;
    border: 8px solid #1a1a1a;
  }
}

/* Header */
.header {
  padding: 16px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,10,0.9);
  z-index: 100;
  gap: 8px;
}

.header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header .subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.header .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Screens */
.screen {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 90px;
  display: none;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

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

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
}

.btn-success {
  background: var(--accent-2);
  color: #001a0d;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-3);
}

/* Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

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

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
}

.card:active {
  transform: scale(0.99);
}

.card-image {
  width: 100%;
  height: 180px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}

.card-image .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  color: white;
  font-weight: 600;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-2);
}

/* Event detail */
.event-hero {
  width: 100%;
  height: 220px;
  background: var(--surface-3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin-bottom: 16px;
  position: relative;
}

.event-hero .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.75);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.detail-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-2);
}

.info-row span:first-child {
  color: var(--text-secondary);
}

.info-row span:last-child {
  font-weight: 600;
}

/* Bottom navigation */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--surface-2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 10px 0;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item .icon {
  font-size: 1.3rem;
}

/* Tickets */
.ticket {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border-left: 4px solid var(--accent);
}

.ticket h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.ticket p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.ticket-qr {
  width: 100%;
  height: 100px;
  background: white;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Map fullscreen */
#screen-content.map-screen {
  padding: 0;
  overflow: hidden;
}

.map-container {
  width: 100%;
  height: 400px;
  background: #1a1a1a;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#map-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  border-radius: 0;
  height: 100% !important;
  width: 100% !important;
}

.map-pin {
  position: absolute;
  background: var(--accent);
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  transform: translate(-50%, -100%);
  cursor: pointer;
  white-space: nowrap;
}

.map-pin::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent);
}

/* Utils */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden {
  display: none !important;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text);
}

.badge-accent {
  background: var(--accent);
  color: white;
}

.badge-success {
  background: var(--accent-2);
  color: #001a0d;
}

.promo-code {
  background: var(--surface-2);
  border: 1px dashed var(--accent-3);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--accent-3);
  margin: 10px 0;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.stat-card .number {
  font-size: 1.4rem;
  font-weight: 800;
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.earning-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-2);
  font-size: 0.9rem;
}
