@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  /* Renk Paleti (Domain 1 Tailwind ile %100 aynı) */
  --c-primary: #2563eb; /* blue-600 */
  --c-primary-hover: #1d4ed8; /* blue-700 */
  --c-bg: #f9fafb; /* gray-50 */
  --c-card: #ffffff; /* white */
  --c-text-main: #111827; /* gray-900 */
  --c-text-muted: #6b7280; /* gray-500 */
  --c-border: #e5e7eb; /* gray-200 */
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--c-bg);
  margin: 0;
  color: var(--c-text-main);
  -webkit-font-smoothing: antialiased;
}

.site-header {
  text-align: center;
  padding: 30px 15px 20px 15px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.site-header h1 {
  margin: 0 0 5px 0;
  font-size: 26px;
  font-weight: 900;
  color: var(--c-primary);
  letter-spacing: -0.02em;
}

.site-header p {
  margin: 0;
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 14px;
}

/* Event Grid */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* KARTLAR: Tailwind Shadow-sm ve Rounded-2xl hissi */
.event-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  border-color: #bfdbfe; /* Tailwind blue-200 */
}

.card-image {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: #f3f4f6;
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-date {
  color: var(--c-primary);
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-text-main);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.card-location {
  font-size: 13px;
  color: var(--c-text-muted);
  margin: 0 0 16px 0;
  font-weight: 500;
}

/* BUTONLAR: Tailwind Active Scale ve Gölge Uyumları */
.btn {
  background: var(--c-primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
}

.btn:hover:not(:disabled) {
  background: var(--c-primary-hover);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: #f3f4f6; /* Tailwind gray-100 */
  color: #374151; /* Tailwind gray-700 */
  border: 1px solid #d1d5db; /* Tailwind gray-300 */
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.btn-ghost:hover {
  background: #e5e7eb; /* Tailwind gray-200 */
  color: var(--c-text-main);
}

.btn-outline {
  border: 1px solid var(--c-primary);
  color: var(--c-primary);
  background: transparent;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 700;
  margin-top: auto;
  font-family: "Inter", sans-serif;
}
.btn-outline:hover {
  background: #eff6ff;
}

/* POPUP / MODAL EKRANLARI: Animasyon ve Yumuşak Hatlar */
.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.popup {
  background: var(--c-card);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--c-border);
  border-radius: 20px 20px 0 0;
}

.popup header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--c-text-main);
}

.popup #popup-body,
.popup #checkout-body {
  padding: 20px;
  overflow-y: auto;
}

.popup footer {
  padding: 20px;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8fafc;
  border-radius: 0 0 20px 20px;
}

.popup-cover {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.popup-meta {
  display: flex;
  gap: 15px;
  font-weight: bold;
  color: var(--c-primary);
  font-size: 14px;
}
.popup-section {
  margin-top: 15px;
  font-size: 14px;
}
.popup-desc {
  margin-top: 15px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}
.popup-rules {
  margin-top: 15px;
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  font-size: 13px;
  color: #991b1b;
}
/* Checkout Form & Cart Styles */
.ticket-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #f8fafc;
}
.ticket-tier-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: #1f2937;
}
.ticket-tier-info p {
  margin: 0;
  font-size: 13px;
  color: #2563eb;
  font-weight: bold;
}
.ticket-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 4px;
}
.ticket-qty-btn {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  color: #4b5563;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ticket-qty-btn:hover {
  background: #e5e7eb;
  color: #111;
}
.ticket-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.ticket-qty-val {
  font-weight: bold;
  font-size: 15px;
  min-width: 20px;
  text-align: center;
}

.checkout-form-group {
  margin-bottom: 15px;
}
.checkout-form-group label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #4b5563;
  margin-bottom: 6px;
}
.checkout-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.checkout-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.qr-mode-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.qr-mode-option {
  flex: 1;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  background: #fff;
}
.qr-mode-option.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.qr-mode-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
}
.qr-mode-option strong {
  display: block;
  font-size: 14px;
  color: #1e3a8a;
  margin-bottom: 4px;
}
.qr-mode-option span {
  font-size: 11px;
  color: #6b7280;
}

.checkout-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  text-align: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sub-guest-inputs {
  padding-left: 10px;
  border-left: 2px solid #cbd5e1;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}
.status-sold-out {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fca5a5;
}
.status-coming {
  background: #fefce8;
  color: #eab308;
  border: 1px solid #fde047;
}
