:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f3f4f6;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
  --transition: 200ms ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  padding: 2rem;
}

/* Typography */
h1,
h2 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

/* Layout containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-title h1 {
  font-size: 1.5rem;
  margin: 0;
}

.tagline {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-light);
}

.search-and-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.location-input {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.location-input .form-input {
  width: 220px;
}

@media (max-width: 900px) {
  .search-and-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filters {
    flex-wrap: wrap;
  }

  .location-input .form-input {
    width: 100%;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.event {
  position: relative;
  overflow: hidden;
}

.event-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 0.25rem);
  margin-bottom: 1rem;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.event-title {
  margin: 0;
  font-size: 1.25rem;
}

.event-status {
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}

.event-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.event-status.approved {
  background: #dcfce7;
  color: #166534;
}

.event-meta {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Forms */
.form-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
  gap: 0.5rem;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #047857;
}

/* Search input */
.search-container {
  position: relative;
  max-width: 400px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-left: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    max-width: none;
  }

  .event-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .event-status {
    align-self: flex-start;
  }
}

/* Footer */
.site-footer {
  background: #0f172a;
  /* dark */
  color: #e6eef8;
  padding: 2rem 0;
  margin-top: 2rem;
}

.site-footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.site-footer h3 {
  margin: 0 0 0.5rem 0;
}

.site-footer a {
  color: #93c5fd;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-footer .footer-content {
    flex-direction: column;
  }
}

/* File input styling */
.file-input-container {
  margin-bottom: 1rem;
}

.file-input-label {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}

.file-input-label:hover {
  border-color: var(--primary);
  background: white;
}

.file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  position: absolute;
  z-index: -1;
}

/* Admin filters */
.events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-filters {
  display: flex;
  gap: 0.5rem;
}

.btn-filter {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-filter:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.25rem;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.approved {
  background: #dcfce7;
  color: #166534;
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.75rem;
  border: 2px solid var(--primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Status message */
.status-message {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
  z-index: 1000;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Hide approval badges from public UI (quick override) */
.status-badge,
.event-status.approved,
.event-status.pending {
  display: none !important;
}

/* Like button styles */
.like-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: rgba(156, 163, 175, 1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  z-index: 10;
}

.like-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: rgba(139, 92, 246, 1);
  transform: scale(1.05);
}

.like-btn.liked {
  background: rgba(139, 92, 246, 0.3);
  color: rgba(139, 92, 246, 1);
}

.like-btn .material-icons {
  font-size: 14px;
}

.like-btn .likes-count {
  font-weight: 500;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Section grids */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  align-items: center;
}

.small-card {
  padding: 0.75rem;
}

.small-card .card-image img {
  height: 100px;
  width: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 0.25rem);
}

.video-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

.partners-grid .partner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.events-header h1 {
  margin: 0;
}

/* Horizontal Navigation Styles */
.horizontal-nav {
  position: relative;
}

.nav-container {
  overflow: hidden;
}

.nav-scroll {
  display: flex;
  gap: 1rem; /* 16px gap between buttons */
  animation: scroll 40s linear infinite;
  width: calc((160px * 12) + (16px * 11) + (160px * 12) + (16px * 11)); /* 12 buttons + 11 gaps, duplicated */
}

.nav-btn {
  flex-shrink: 0;
  min-width: 160px;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.nav-btn.active {
  background-color: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #a855f7;
}

/* Auto-scroll animation */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause animation on hover */
.horizontal-nav:hover .nav-scroll {
  animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .nav-btn span:not(.material-icons) {
    display: none;
  }

  .nav-btn {
    min-width: 48px;
    padding: 8px;
  }

  .nav-scroll {
    width: calc((48px * 12) + (16px * 11) + (48px * 12) + (16px * 11)); /* 12 buttons + 11 gaps, duplicated */
  }
}
