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

:root {
  --primary: #FF006E;
  --secondary: #00F5FF;
  --accent: #FFD60A;
  --dark: #1a1a2e;
  --darker: #0f0f23;
  --light: #ffffff;
  --success: #00ff00;
  --error: #ff0000;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: linear-gradient(135deg, var(--darker) 0%, #2a0845 50%, #1a1a3e 100%);
  color: var(--light);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  position: relative;
}

body.admin-body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Animated background stars */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--light);
  border-radius: 50%;
  opacity: 0.2;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
}

/* Header */
header {
  background: linear-gradient(90deg, rgba(255, 0, 110, 0.1) 0%, rgba(0, 245, 255, 0.1) 100%);
  border-bottom: 2px solid var(--primary);
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 0 15px rgba(255, 0, 110, 0.2);
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
}

.title {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  font-weight: 300;
}

/* Main Content */
main {
  padding: 2rem 1rem;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .title {
    font-size: 2rem;
  }
}

/* Sections */
section {
  opacity: 1;
}

.registration-section,
.food-section,
.stats-section,
.info-section,
.admin-section,
.login-section,
.dashboard-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 0, 110, 0.3);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
}

.registration-section:hover,
.food-section:hover,
.stats-section:hover,
.info-section:hover {
  border-color: var(--secondary);
  box-shadow: 0 8px 32px 0 rgba(0, 245, 255, 0.3);
}

/* Form Container */
.form-container,
.food-container,
.stats-container,
.login-container,
.dashboard-container,
.admin-container {
  width: 100%;
}

/* Section Titles */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  font-weight: 700;
}

.food-subtitle {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Form Styling */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--secondary);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

/* Multiple Attendees Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.attendee-group {
  background: rgba(0, 245, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.attendee-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 245, 255, 0.1);
  gap: 0.75rem;
}

.attendee-group-title {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-grow: 1;
}

.attendee-group .remove-attendee {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid #ff0000;
  color: #ff0000;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  min-width: fit-content;
}

.attendee-group .remove-attendee:hover {
  background: rgba(255, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: var(--dark);
  box-shadow: 0 0 10px rgba(255, 0, 110, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(255, 0, 110, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: var(--dark);
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.15);
}

.btn-secondary:hover {
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.3);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
  color: var(--light);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.15);
}

.btn-danger:hover {
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-text {
  position: relative;
  z-index: 1;
}

.party-form,
.admin-form {
  display: flex;
  flex-direction: column;
}

.party-form button,
.admin-form button {
  margin-top: 1rem;
  width: 100%;
}

/* Messages */
.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  display: none;
}

.message.success {
  display: block;
  background: rgba(0, 255, 0, 0.2);
  border: 2px solid var(--success);
  color: var(--success);
}

.message.error {
  display: block;
  background: rgba(255, 0, 0, 0.2);
  border: 2px solid var(--error);
  color: var(--error);
}

/* Food List */
.food-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.food-item {
  background: rgba(0, 245, 255, 0.1);
  border-left: 4px solid var(--secondary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.food-item::before {
  content: '🍽️';
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.loading {
  text-align: center;
  color: var(--secondary);
  padding: 2rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 0, 110, 0.1) 0%, rgba(0, 245, 255, 0.1) 100%);
  border: 2px solid var(--primary);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-card:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-stats {
  margin-bottom: 2rem;
}

/* Admin Table */
.admin-table {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: rgba(255, 0, 110, 0.1);
  border-bottom: 2px solid var(--primary);
}

.admin-table th {
  padding: 1rem;
  text-align: left;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 0, 110, 0.2);
}

.admin-table tbody tr {
  transition: all 0.3s ease;
}

.admin-table tbody tr:hover {
  background: rgba(0, 245, 255, 0.05);
}

.delete-btn {
  background: linear-gradient(90deg, #ff0000, #ff6b6b);
  color: var(--light);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.delete-btn:hover {
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
}

/* Admin Actions */
.admin-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.admin-actions .btn {
  flex: 1;
  min-width: 150px;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header .btn {
  width: auto;
}

/* Info Section */
.info-section {
  text-align: center;
}

.info-container {
  width: 100%;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.info-card {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(255, 0, 110, 0.05) 100%);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.info-card:hover {
  border-color: var(--secondary);
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(255, 0, 110, 0.1) 100%);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.15);
}

.info-label {
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.info-content {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Code Login Screen */
.code-login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(25, 0, 51, 0.95) 0%, rgba(51, 0, 102, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow-y: auto;
}

.code-login-section {
  width: 100%;
  max-width: 500px;
  padding: 2rem;
}

.code-login-container {
  background: rgba(0, 245, 255, 0.02);
  border: 2px solid rgba(0, 245, 255, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
}

.code-login-container .section-title {
  margin-bottom: 1rem;
  text-align: center;
}

.code-login-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.code-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.code-form .form-group {
  margin-bottom: 0;
}

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

.code-form .form-group input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 245, 255, 0.05);
  border: 2px solid rgba(0, 245, 255, 0.3);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
}

.code-form .form-group input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
  background: rgba(0, 245, 255, 0.1);
}

.code-form .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.code-form .btn {
  margin-top: 0.5rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 0, 110, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--secondary), var(--accent));
}

/* Responsive */
@media (max-width: 1024px) {
  .content-wrapper {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1.5rem 1rem;
  }

  .title {
    font-size: 2rem;
  }

  main {
    padding: 1rem;
  }

  .registration-section,
  .food-section,
  .stats-section,
  .info-section,
  .login-section,
  .dashboard-section {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .admin-table {
    font-size: 0.9rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-header .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .code-login-section {
    padding: 1rem;
  }

  .code-login-container {
    padding: 1.5rem;
  }
}

/* Light animations for interactive elements */
.btn-primary:active {
  opacity: 0.9;
}
