:root {
  --primary-bg: #f8fafc;
  --secondary-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent-primary: #2563eb;
  --accent-secondary: #0ea5e9;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(148, 163, 184, 0.2);
  --hover-overlay: rgba(59, 130, 246, 0.05);
  --shadow-glass: 0 4px 6px rgba(0, 0, 0, 0.05);
  --border-radius: 8px;
  --transition: all 0.2s ease;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
}
a {
  text-decoration: none;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-bg);
  min-height: 100vh;
  color: var(--text-primary);
  position: relative;
}

.navbar {
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  background: linear-gradient(
    45deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}
.logout {
  background-color: rgb(196, 9, 9) !important;
  color: white;
  font-weight: bold !important;
}

.nav-item a,
.logout {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item a:hover,
.logout:hover {
  background: var(--hover-overlay);
  color: #fff;
  border-color: var(--glass-border);
}

.nav-item a.active {
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  color: white;
  border-color: var(--accent-primary);
}

.nav-item {
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  color: white;
}

.nav-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* * headings */
.headings {
  font-weight: bold;
  background: linear-gradient(
    45deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 2rem;
}

.top-bar h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 2rem; /* Space between search, button, count */
}

/* Search Input Styling */
.search-input {
  padding: 10px 14px;
  height: 44px; /* Match button height */
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}
.add-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.category-count {
  font-weight: 600;
  font-size: 16px;
  font-weight: bold;
  font-size: 16px;
  color: black;
  padding: 0.75rem 1.25rem;
  background: var(--secondary-bg);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.384);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* Clean Modal Design */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--secondary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  width: 50%;
  min-width: 300px;
  max-width: 600px;
  max-height: 100vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(-100vw);
  animation: slideInFromLeft 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100vw);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100vw);
  }
}

.modal-content.closing {
  animation: slideOutToLeft 0.3s ease-in-out forwards;
}

.modal-header {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-header h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--hover-overlay);
  color: var(--text-primary);
}

.modal-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.required {
  color: var(--danger-color);
  font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group [contenteditable] {
  width: 100%;
  padding: 0.75rem;
  background: var(--secondary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group [contenteditable]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contenteditable-field {
  min-height: 100px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--secondary-bg);
}

.image-preview {
  width: 100%;
  max-height: 200px;
  margin: 10px 0;
  border-radius: var(--border-radius);
  display: none;
  object-fit: cover;
  border: 1px solid var(--glass-border);
}

.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.form-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  color: white;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
  background: var(--hover-overlay);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-item a,
  .logout {
    padding: 0.5rem 1rem;
    font-size: 12px;
  }

  .top-bar {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .top-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .modal-content {
    width: 90%;
    min-width: unset;
    margin: 1rem;
  }

  table {
    font-size: 14px;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 1rem;
  }

  .logo {
    font-size: 1.4rem;
  }

  .top-bar h1 {
    font-size: 1.5rem;
  }

  .modal-content {
    width: 95%;
  }

  .modal-form {
    padding: 1rem;
  }
}
.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}

.custom-alert-box {
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}
#violate-fk {
  margin-top: 6px;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  color: white;
  font-weight: bold;
  padding: 6px;
  border: none;
  border-radius: 3px;
}
