:root {
  --color-primary: #0f0;
  --color-primary-dim: #0c0;
  --color-primary-dark: #060;
  --color-accent: #0ff;
  --color-accent-dim: #0cc;
  --color-warning: #ff0;
  --color-danger: #f44;
  --color-danger-dim: #f66;
  --color-danger-dark: #3a0000;
  --color-role: #f80;
  --color-bg-black: #000;
  --color-bg-dark: #0a0a0a;
  --color-bg-darker: #111;
  --color-bg-darkest: #222;
  --color-border-dim: #333;
  --color-text-dim: #666;
  --color-text-darker: #888;
  --shadow-primary: rgba(0, 255, 0, 0.3);
  --shadow-primary-strong: rgba(0, 255, 0, 0.5);
  --shadow-primary-stronger: rgba(0, 255, 0, 0.6);
  --shadow-accent: rgba(0, 255, 255, 0.5);
  --shadow-danger: rgba(255, 68, 68, 0.3);
  --shadow-danger-strong: rgba(255, 68, 68, 0.5);
}

.menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-bg-black);
  color: var(--color-primary);
  font-family: monospace;
  z-index: 2000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.menu-container.hidden {
  display: none;
}

.menu-header {
  background: var(--color-bg-darker);
  border-bottom: 2px solid var(--color-primary);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px var(--shadow-primary);
}

.menu-header-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--color-primary);
  text-shadow: 0 0 8px var(--shadow-primary-stronger);
}

.menu-header-user {
  display: flex;
  gap: 20px;
  align-items: center;
}

.menu-header-user-info {
  font-size: 14px;
  color: #0c0;
}

.menu-header-user-name {
  color: #0ff;
  font-weight: bold;
}

.menu-header-user-role {
  color: #f80;
  font-size: 12px;
  margin-left: 8px;
}

.menu-logout-btn {
  background: var(--color-bg-darkest);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  padding: 6px 12px;
  cursor: pointer;
  font-family: monospace;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.2s;
}

.menu-logout-btn:hover {
  background: var(--color-danger);
  color: var(--color-bg-black);
  box-shadow: 0 0 8px var(--shadow-danger-strong);
}

.menu-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.menu-nav {
  width: 280px;
  background: #0a0a0a;
  border-right: 2px solid #0f0;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 255, 0, 0.2);
}

.menu-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-nav-item {
  margin-bottom: 4px;
}

.menu-nav-link {
  display: block;
  padding: 10px 15px;
  color: #0c0;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  background: #111;
}

.menu-nav-link:hover {
  background: #1a1a1a;
  border-color: #0f0;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
  color: #0f0;
}

.menu-nav-link.active {
  background: #0f0;
  color: #000;
  border-color: #0f0;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.5);
}

.menu-nav-shortcut {
  color: #0ff;
  font-weight: bold;
  margin-right: 8px;
}

.menu-section {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: #000;
}

.menu-section-title {
  font-size: 24px;
  color: #0f0;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
  border-bottom: 2px solid #0f0;
  padding-bottom: 10px;
}

.menu-section-content {
  font-size: 14px;
  line-height: 1.6;
  color: #0c0;
}

.menu-divider {
  border: none;
  border-top: 1px solid #333;
  margin: 10px 0;
}

.menu-back-btn {
  margin-top: 20px;
  padding: 10px 20px;
  background: #222;
  color: #0f0;
  border: 1px solid #0f0;
  cursor: pointer;
  font-family: monospace;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.2s;
}

.menu-back-btn:hover {
  background: #0f0;
  color: #000;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #0f0;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0c0;
}

.menu-section-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.menu-auth-container {
  max-width: 400px;
  width: 100%;
  background: #0a0a0a;
  border: 2px solid #0f0;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.menu-auth-title {
  text-align: center;
  margin-bottom: 25px;
}

.menu-auth-error {
  background: #3a0000;
  color: #f44;
  border: 1px solid #f44;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}

.menu-auth-form {
  margin-bottom: 20px;
}

.menu-form-group {
  margin-bottom: 18px;
}

.menu-form-label {
  display: block;
  color: #0f0;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.menu-form-input {
  width: 100%;
  padding: 10px 12px;
  background: #111;
  color: #0f0;
  border: 1px solid #0c0;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.2s;
}

.menu-form-input:focus {
  outline: none;
  border-color: #0f0;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
  background: #1a1a1a;
}

.menu-form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.menu-btn {
  padding: 12px 24px;
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid;
  text-transform: uppercase;
}

.menu-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.menu-btn-primary {
  width: 100%;
  background: #0f0;
  color: #000;
  border-color: #0f0;
}

.menu-btn-primary:hover:not(:disabled) {
  background: #0c0;
  border-color: #0c0;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.5);
}

.menu-btn-secondary {
  background: #222;
  color: #0f0;
  border-color: #0f0;
}

.menu-btn-secondary:hover:not(:disabled) {
  background: #0f0;
  color: #000;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.menu-auth-toggle {
  text-align: center;
  color: #0c0;
  font-size: 13px;
  margin-bottom: 15px;
}

.menu-auth-toggle a {
  color: #0ff;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
}

.menu-auth-toggle a:hover {
  color: #0f0;
}

.menu-auth-cancel {
  text-align: center;
  margin-top: 20px;
}

.menu-auth-cancel .menu-btn {
  width: 100%;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #0f0;
  padding-bottom: 5px;
}

.admin-tab {
  padding: 10px 20px;
  background: #111;
  color: #0c0;
  border: 1px solid #0c0;
  border-bottom: none;
  cursor: pointer;
  font-family: monospace;
  font-size: 14px;
  transition: all 0.2s;
  border-radius: 4px 4px 0 0;
}

.admin-tab:hover {
  background: #1a1a1a;
  color: #0f0;
}

.admin-tab-active {
  background: #0f0;
  color: #000;
  border-color: #0f0;
  font-weight: bold;
}

.admin-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #0a0a0a;
  border: 1px solid #0f0;
}

.admin-table th {
  background: #111;
  color: #0f0;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid #0f0;
  font-size: 13px;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #222;
  color: #0c0;
  font-size: 13px;
}

.admin-table tr:hover {
  background: #111;
}

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

.admin-action-btn {
  background: #222;
  color: #0ff;
  border: 1px solid #0ff;
  padding: 5px 12px;
  cursor: pointer;
  font-family: monospace;
  font-size: 12px;
  border-radius: 3px;
  transition: all 0.2s;
  margin-right: 5px;
}

.admin-action-btn:hover {
  background: #0ff;
  color: #000;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  overflow-y: auto;
  padding: 20px;
}

.admin-modal-content {
  background: #000;
  border: 2px solid #0f0;
  border-radius: 8px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.admin-modal-header {
  background: #111;
  border-bottom: 2px solid #0f0;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-modal-close {
  background: none;
  border: none;
  color: #f44;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-modal-close:hover {
  color: #f66;
  transform: scale(1.2);
}

.admin-modal-body {
  padding: 20px;
  color: #0c0;
}

.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pagination-info {
  color: #0c0;
  font-size: 13px;
}

.pagination-buttons {
  display: flex;
  gap: 10px;
}

.admin-table tbody tr {
  cursor: pointer;
}

.admin-table tbody tr:hover td {
  color: #0f0;
}

.admin-table th {
  cursor: default;
}

.admin-table td pre {
  background: #111;
  padding: 5px;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 12px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  border: 4px solid #222;
  border-top: 4px solid #0f0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: #0f0;
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
}

.error-message {
  background: #3a0000;
  color: #f44;
  border: 2px solid #f44;
  padding: 15px 20px;
  margin: 15px 0;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.error-message strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #f66;
}

.success-message {
  background: #003a00;
  color: #0f0;
  border: 2px solid #0f0;
  padding: 15px 20px;
  margin: 15px 0;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.help-modal.active {
  opacity: 1;
  pointer-events: all;
}

.help-modal-content {
  background: #000;
  border: 2px solid #0f0;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(0, 255, 0, 0.6);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.help-modal-header {
  background: #111;
  border-bottom: 2px solid #0f0;
  padding: 20px;
  text-align: center;
}

.help-modal-header h2 {
  color: #0f0;
  font-size: 22px;
  margin: 0;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}

.help-modal-body {
  padding: 25px;
  color: #0c0;
}

.help-shortcuts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-shortcut-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  margin-bottom: 8px;
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 4px;
  transition: all 0.2s;
}

.help-shortcut-item:hover {
  border-color: #0f0;
  background: #111;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.2);
}

.help-shortcut-key {
  color: #0ff;
  font-weight: bold;
  background: #111;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #0ff;
  font-size: 13px;
  min-width: 80px;
  text-align: center;
}

.help-shortcut-desc {
  color: #0c0;
  flex: 1;
  margin-left: 20px;
  font-size: 13px;
}

.help-modal-footer {
  background: #0a0a0a;
  border-top: 2px solid #0f0;
  padding: 15px 20px;
  text-align: center;
}

.menu-section.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.menu-nav-link {
  position: relative;
  overflow: hidden;
}

.menu-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: #0f0;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.menu-nav-link:hover::before,
.menu-nav-link.active::before {
  transform: scaleY(1);
}

.menu-btn {
  position: relative;
  overflow: hidden;
}

.menu-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.menu-btn:active::after {
  width: 300px;
  height: 300px;
}

.skeleton {
  background: linear-gradient(90deg, #111 25%, #1a1a1a 50%, #111 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

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

.skeleton-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-bg-darkest);
}

.skeleton-row {
  height: 40px;
}

.skeleton-cell {
  height: 16px;
  width: 80%;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-bg-darker);
  border: 1px solid var(--color-danger);
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  color: var(--color-danger);
  text-transform: uppercase;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

@media (max-width: 768px) {
  .menu-nav {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--color-primary);
  }

  .menu-content {
    flex-direction: column;
  }

  .menu-section {
    padding: 20px 15px;
  }

  .menu-section-title {
    font-size: 20px;
  }

  .menu-form-group {
    margin-bottom: 15px;
  }

  .admin-controls {
    flex-direction: column;
    gap: 10px;
  }

  .admin-controls input,
  .admin-controls select {
    max-width: 100% !important;
  }

  .admin-table {
    font-size: 12px;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px;
  }

  .admin-modal {
    padding: 10px;
  }

  .admin-modal-content {
    max-width: 100%;
  }

  .help-modal-content {
    max-width: 95%;
    max-height: 85vh;
  }

  .menu-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .menu-header-user {
    width: 100%;
    justify-content: space-between;
  }
}
