/*
==============================================
Soniv Entertainment - Main Stylesheet
==============================================
*/

/*
Table of Contents:
- :root Variables & Theme Definitions
- Global Resets
- Body & Typography
- Main Layout Containers
- Components
  - Buttons
  - Cards
  - Forms (Inputs, Selects)
  - Navigation & Header
  - Sidebar
- Page-Specific Styles
  - Admin
  - Auth (Login/Signup)
  - Checkout
  - Discover
- Responsive Design
*/

/* :root Variables (Default Dark Theme) */
:root {
  --bg-primary: #0b0b0f;
  --bg-secondary: #12121a;
  --bg-card: #181822;
  --text-primary: #e9ecf2;
  --text-muted: #8e93a4;
  --border-color: #2a2a3a;
  
  --accent-primary: #7c5cff;
  --accent-secondary: #1dd1a1;
  --font-main: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

body.light-theme {
  --bg-primary: #ffffff;
  --bg-secondary: #f0f0f0;
  --bg-card: #f7f7f9;
  --text-primary: #111111;
  --text-muted: #555555;
  --border-color: #dddddd;
}

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

html, body {
  height: 100%;
}

/* Body & Typography */
body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* The radial gradients are a dark-theme-only enhancement */
body:not(.light-theme) {
  background:
    radial-gradient(900px 600px at 20% -10%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(700px 500px at 100% 20%, rgba(29,209,161,.18), transparent 60%),
    var(--bg-primary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.75em;
  color: var(--text-primary);
}
h1 { font-size: 2em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.25em; }

p {
  line-height: 1.6;
  margin-bottom: 1em;
  color: var(--text-muted);
}
p.sub { color: var(--text-muted); }

/* Main Layout Containers */
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.auth-container {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* --- Components --- */

/* Buttons */
.btn, button {
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), #6a4dff);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
  text-align: center;
}

button:hover, .btn:hover {
  opacity: .95;
  text-decoration: none;
}

button:active, .btn:active {
  transform: translateY(1px);
}

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

.btn.ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.card .title {
  font-weight: 700;
  color: var(--text-primary);
}

.card .meta {
  color: var(--text-muted);
  font-size: 13px;
}

/* Forms (Inputs, Selects) */
input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124,92,255,.2);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row > * {
  flex: 1;
}

/* Navigation & Header */
.header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2em;
  color: var(--text-primary);
}
.logo-img {
  width: 34px;
  height: 34px;
}
.nav {
  display: flex;
  gap: 16px;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
}
.nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.hamburger {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --- Page-Specific Styles --- */

/* Admin */
.sidebar {
  width: 220px;
  background: var(--bg-secondary);
  padding: 20px;
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: fixed;
}
.sidebar .brand {
  font-weight: 700;
  margin-bottom: 20px;
}
.sidebar a {
  display: block;
  padding: 10px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
}
.sidebar a.active, .sidebar a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.admin-content {
  margin-left: 220px;
  padding: 24px;
}

/* Auth (Login/Signup) */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.auth-card h1 {
  font-size: 24px;
  margin-bottom: 6px;
  text-align: center;
}
.roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1.5em 0;
}
.role-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: left;
  color: var(--text-primary);
}
.role-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card);
}
.role-card strong {
  display: block;
  font-size: 1em;
  color: var(--text-primary);
}
.role-card span {
  font-size: 0.85em;
  color: var(--text-muted);
}
.hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Checkout */
.checkout-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.event-summary {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
}

/* Discover */
.hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
}
.kicker {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 12px;
}
.searchbar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font-size: 16px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}
.chip.active {
  background: rgba(124,92,255,.18);
  color: #dcd5ff;
  border-color: rgba(124,92,255,.5);
}
.card .thumb {
  height: 140px;
  background: linear-gradient(135deg,rgba(124,92,255,.35),rgba(29,209,161,.25)),radial-gradient(350px 120px at 20% 20%,rgba(255,255,255,.08),transparent);
}


/* --- Discover Page Category View --- */
.category-section {
    margin-bottom: 3rem;
}

.category-section h3 {
    font-size: 1.75em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.event-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.event-row .event-card {
    background-color: var(--bg-card);
    overflow: hidden; /* Ensures image corners are rounded */
}

.event-row .event-card img {
    height: 150px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.event-row .event-card .event-info {
    padding: 1rem;
}

.event-row .event-card .event-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1em;
}

.event-row .event-card .event-info p {
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 0;
}


/* --- Side Menu & Overlay (Hidden on Desktop) --- */
.side-menu, 
.menu-overlay {
  display: none;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  h1 { font-size: 1.75em; }
  h2 { font-size: 1.5em; }
  
  .grid { /* Keep for other potential grids */
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .admin-content {
    margin-left: 0;
  }

  /* --- Mobile Header Fix --- */
  .header-inner {
    flex-direction: row !important; /* Force horizontal */
    justify-content: space-between;
    padding: 0 16px;
  }

  .nav {
    display: none; /* Hide top nav on mobile, moved to bottom bar */
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
  }

  .hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
  }

  .header-actions {
    gap: 12px;
  }

  /* --- Side Menu Drawer (Mobile) --- */
  .side-menu {
    display: flex; /* Restore display for mobile */
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--bg-card);
    z-index: 1100;
    transition: right 0.3s ease-in-out;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
  }

  .side-menu.active {
    right: 0;
  }

  .menu-overlay {
    display: none; /* Default hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1050;
  }

  .menu-overlay.active {
    display: block;
  }

  .side-menu-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
  }

  .side-menu-links {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .side-menu-links a {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-primary);
  }

  .close-menu {
    background: transparent !important; /* Override global button style */
    padding: 0 !important;
    border: none !important;
    color: var(--text-primary);
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
  }
  
  .close-menu:hover {
      background: transparent !important;
      opacity: 0.8;
  }

  .side-menu-links hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
  }

  /* --- Bottom Navigation Bar (App Feel) --- */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(18, 18, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom); /* Support for iPhone notches */
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
    transition: color 0.2s;
  }

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

  .bottom-nav-item svg {
    width: 24px;
    height: 24px;
  }

  /* Add padding to body so content isn't hidden behind bottom nav */
  body {
    padding-bottom: 80px;
  }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

  /* --- Responsive Enhancements --- */

  /* Stack filter controls on mobile */
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  /* Stack profile header on mobile */
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  /* Re-stack event cards in the profile list for mobile */
  .profile-events-list .event-card {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-events-list .event-card .event-card-img {
    width: 100%;
    height: 180px; /* Give it a fixed height on mobile */
  }

  .profile-events-list .event-card .event-info {
    align-items: flex-start;
  }

  .profile-events-list .event-card .event-info .btn {
    margin-left: 0; /* Reset button alignment */
    margin-top: 16px;
    align-self: flex-start;
  }

  /* --- Discover Page Horizontal Scroll --- */
  .category-section h3 {
      font-size: 1.5em;
      margin-bottom: 0.5rem;
  }

  .event-row {
    display: flex;
    overflow-x: auto;
    /* Add some padding to the sides to see shadows */
    padding: 1rem 0.5rem; 
    gap: 16px;
    /* Hide scrollbar for a cleaner look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    grid-template-columns: none; /* Override desktop grid */
  }

  .event-row::-webkit-scrollbar { 
    display: none;  /* Safari & Chrome */
  }

  /* Give the parent container a negative margin to align with page edges */
  #category-view {
      margin: 0 -24px; /* Counteract parent padding */
  }
  .category-section {
      padding: 0 24px; /* Add padding back to the section */
      margin-bottom: 1rem;
  }

  .event-row .event-card {
    flex: 0 0 280px; /* Do not shrink, do not grow, basis of 280px */
  }

  .event-row .event-card img {
      height: 150px;
      width: 100%;
      object-fit: cover;
  }
}

/* --- Discover Page Enhancements --- */

.filter-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
}

/* Make this selector more specific to avoid impacting other pages */
.discover-page .filter-controls input[type="text"] {
    flex-grow: 1;
}

.filter-controls select {
    min-width: 180px;
    flex-shrink: 0; /* Prevents the select from shrinking */
}

/* Ensure event cards are block-level for JS toggling */
.events-grid .event-card {
    display: block; /* This is the default for divs, but good to be explicit */
}

/* --- Holographic Ticket Effect --- */
.holographic-ticket {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.holographic-ticket::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(124, 92, 255, 0.2) 50%,
    rgba(29, 209, 161, 0.2) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(-45deg);
  transition: 0.5s;
  z-index: 1;
  pointer-events: none;
}

.holographic-ticket:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.2);
  border-color: rgba(124, 92, 255, 0.4);
}

.holographic-ticket:hover::before {
  left: 100%;
  top: 100%;
}

.holographic-ticket .event-card-img {
  opacity: 0.8;
  filter: contrast(1.1) brightness(1.1);
}

/* Subtle rainbow "sheen" on top */
.holographic-ticket::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(255, 0, 255, 0.03) 25%,
    rgba(0, 255, 255, 0.03) 50%,
    rgba(255, 255, 0, 0.03) 75%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding: 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
}

.profile-info h2 {
    margin-bottom: 0.25em;
}

.profile-info p {
    margin-bottom: 1em;
}

.profile-content {
    margin-top: 24px;
}

.profile-content h3 {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* --- Notifications Panel --- */

.notifications-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.bell-icon {
    cursor: pointer;
}

.notifications-panel {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    margin-top: 10px;
}

.notifications-panel.active {
    display: block; /* Shown when active */
}

.notifications-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h4 {
    margin: 0;
    font-size: 1em;
}

.notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.notification-item.unread {
    background-color: rgba(124, 92, 255, 0.1); /* A subtle highlight for unread items */
}

.notification-time {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.notifications-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notifications-footer a {
    font-weight: 600;
}

/* --- Organizer Dashboard Styles --- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    font-size: 1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* --- Manage Events Table --- */
.manage-events-section {
    margin-top: 40px;
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.manage-events-table-wrapper {
    overflow-x: auto;
}

.manage-events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.manage-events-table th, 
.manage-events-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.manage-events-table th {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.manage-events-table td {
    color: var(--text-primary);
}

.manage-events-table tr:last-child td {
    border-bottom: none;
}

.manage-events-table .event-title {
    font-weight: 600;
}

.manage-events-table .status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: capitalize;
}

.manage-events-table .status-active {
    background-color: rgba(29, 209, 161, 0.1);
    color: var(--accent-secondary);
}

.manage-events-table .status-cancelled {
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.manage-events-table .actions {
    display: flex;
    gap: 8px;
}

.manage-events-table .btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chart-container {
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    height: 400px;
}

/* Responsive adjustments for charts */
@media (max-width: 992px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Header Component Fixes --- */

.logo-container .logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.bell-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* --- Profile Page Reorganization --- */

/* Add padding and card styling to the profile content area */
.profile-content.card {
    padding: 24px;
}

.profile-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Override default event-card styles for the list view */
.profile-events-list .event-card {
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    gap: 20px;
    overflow: visible; /* Adjust overflow for the new layout */
    border: none;
    background: var(--bg-secondary);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.profile-events-list .event-card .event-card-img {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
}

.profile-events-list .event-card .event-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.profile-events-list .event-card .event-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.profile-events-list .event-card h3 {
    font-size: 1.1em;
    margin-bottom: 0.25em;
}

.profile-events-list .event-card p {
    margin-bottom: 0.5em;
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 0;
}

/* Adjust button position for list view */
.profile-events-list .event-card .event-info .btn {
    margin-top: auto;
    margin-left: auto; /* Push button to the far right */
}

/* --- Discover Page Category View --- */
.category-section {
    margin-bottom: 3rem;
}

.category-section h3 {
    font-size: 1.75em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.event-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.event-row .event-card {
    background-color: var(--bg-card);
    overflow: hidden; /* Ensures image corners are rounded */
}

.event-row .event-card img {
    height: 150px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.event-row .event-card .event-info {
    padding: 1rem;
}

.event-row .event-card .event-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1em;
}

.event-row .event-card .event-info p {
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 0;
}
/* --- Event Detail Page Styles --- */

.event-detail-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Main content wider than sidebar */
    gap: 40px;
    align-items: flex-start; /* Aligns items to the start of the grid area */
    margin-top: 40px; /* Add some space from the top */
}

.event-detail-main {
    /* Styles for the main event content area */
}

.event-banner-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
}

.event-content {
    /* No right padding needed here as gap handles it */
}

.event-content h1 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.event-content .event-organizer {
    color: var(--text-muted);
    margin-bottom: 1.5em;
    font-size: 1.1em;
}

.event-content h2 {
    font-size: 1.8em;
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.event-content p {
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 1em;
}

.event-detail-sidebar {
    position: sticky; /* Makes the sidebar stick as you scroll */
    top: 20px; /* Distance from the top of the viewport */
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.purchase-box h3 {
    font-size: 1.5em;
    margin-bottom: 1.5em;
    color: var(--text-primary);
}

.purchase-box .price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
    font-size: 1.1em;
}

.purchase-box .price-info.total {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--accent-primary);
    margin-top: 1.5em;
}

.purchase-box hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5em 0;
}

.buy-ticket-btn {
    width: 100%;
    margin-top: 1.5em;
    padding: 15px 20px;
    font-size: 1.1em;
}

/* Responsive adjustments for Event Detail Page */
@media (max-width: 992px) {
    .event-detail-layout {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        gap: 20px;
        margin-top: 20px;
    }

    .event-detail-main {
        padding-right: 0;
    }

    .event-detail-sidebar {
        position: static; /* Disable sticky on mobile */
        top: auto; /* Reset top property */
    }
}
/* --- Event Detail Page Checkout Form Styles --- */

.purchase-box .form-group {
    margin-bottom: 1em;
}

.purchase-box .form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-size: 0.95em;
    color: var(--text-primary);
    font-weight: 500;
}

.purchase-box .form-group input[type="text"],
.purchase-box .form-group input[type="email"],
.purchase-box .form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1em;
    outline: none;
}

.purchase-box .form-row-group {
    display: flex;
    gap: 1em;
}

.purchase-box .form-row-group .form-group {
    flex: 1;
}

.purchase-box .fine {
    font-size: 0.8em;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1.5em;
}

/* --- AI Vibe Toggle Switch --- */
.ai-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px; /* Spacing from input */
}

.ai-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.ai-switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color); /* Default off color */
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary); /* Purple when on */
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* Optional: Add focus styles */
input:focus + .slider {
  box-shadow: 0 0 1px var(--accent-primary);
}

.ai-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

input:checked ~ .ai-label {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(124, 92, 255, 0.4);
}

/* --- Cookie Consent Banner --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-actions {
        align-self: flex-end;
    }
}
