/* Admin Panel Styles - Matching main.css theme */
:root {
  --primary-color: #0a0a2a;
  --secondary-color: #1a1a4a;
  --accent-color: #4a90e2;
  --text-color: #ffffff;
  --gradient-start: #0a0a2a;
  --gradient-end: #1a1a4a;
}

.admin-container {
  max-width: 1200px;
  margin: 100px auto 2rem;
  padding: 0 2rem;
}

.admin-container h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: white;
  text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.admin-actions {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
}

.events-table-container {
  background: rgba(26, 26, 74, 0.8);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 144, 226, 0.2);
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
  margin-bottom: 2rem;
}

#eventsTable {
  width: 100%;
  border-collapse: collapse;
}

#eventsTable th,
#eventsTable td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color) !important;
}

#eventsTable th {
  background-color: rgba(26, 26, 74, 0.9);
  font-weight: 600;
  color: var(--text-color);
}

#eventsTable tr:hover {
  background-color: rgba(74, 144, 226, 0.1);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.edit-btn,
.delete-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.edit-btn {
  background: linear-gradient(45deg, #4a90e2, #67b26f);
  color: white;
}

.delete-btn {
  background: linear-gradient(45deg, #e24a4a, #e27b4a);
  color: white;
}

.edit-btn:hover,
.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow-y: auto;
  padding: 20px;
}

.modal-content {
  background: var(--secondary-color);
  max-width: 600px;
  width: 90%;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 15px;
  position: relative;
  border: 1px solid rgba(74, 144, 226, 0.2);
  box-shadow: 0 0 30px rgba(74, 144, 226, 0.2);
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-color);
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--accent-color);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.image-preview-container {
  margin-top: 1rem;
  border: 1px dashed rgba(74, 144, 226, 0.3);
  padding: 1rem;
  border-radius: 8px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
}

.help-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Button Styles */
.main-btn,
.danger-btn,
.secondary-btn {
  background: linear-gradient(90deg, #2d2e6e 60%, #4b4c9a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-family: "Orbitron", "Roboto", sans-serif;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 46, 110, 0.08);
  margin: 8px 0;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  letter-spacing: 1px;
}

.main-btn:hover,
.danger-btn:hover,
.secondary-btn:hover {
  background: linear-gradient(90deg, #1a1b3a 60%, #2d2e6e 100%);
  box-shadow: 0 4px 16px rgba(45, 46, 110, 0.15);
  transform: translateY(-2px) scale(1.04);
}

.main-btn:active,
.danger-btn:active,
.secondary-btn:active {
  background: #1a1b3a;
  transform: scale(0.98);
}

.danger-btn {
  background: linear-gradient(90deg, #e24a4a 60%, #e27b4a 100%);
}

.danger-btn:hover {
  background: linear-gradient(90deg, #c13a3a 60%, #c26a3a 100%);
}

.secondary-btn {
  background: linear-gradient(90deg, #6c757d 60%, #868e96 100%);
}

.secondary-btn:hover {
  background: linear-gradient(90deg, #5a6268 60%, #6c757d 100%);
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Style the logout button properly */
#logoutBtn {
  background: linear-gradient(45deg, #e24a4a, #e27b4a);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

#logoutBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(226, 74, 74, 0.4);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .admin-container {
    padding: 0 1rem;
    margin-top: 80px;
  }

  .admin-container h1 {
    font-size: 2rem;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .edit-btn,
  .delete-btn {
    width: 100%;
    text-align: center;
  }
}
