:root {
  --bg-main: #05050a;
  --bg-header: #090914;
  --bg-card: #131321;
  --bg-chip: #19192a;
  --bg-chip-active: #e53935;
  --text-main: #ffffff;
  --text-muted: #b3b3c6;
  --accent: #ff4b4b;
  --card-radius: 22px;
  --transition-fast: 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #181829 0, #05050a 45%);
  color: var(--text-main);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* الهيدر */
header {
  background: var(--bg-header);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff4b4b, #ff1744);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.brand-text-main {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-text-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 24px 40px; /* internal padding instead of side gutters */
  box-sizing: border-box;
  overflow-x: hidden;
} 

/* Search Section */
.search-section {
  margin-bottom: 32px;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 18px;
  font-size: 20px;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.search-input {
  width: 100%;
  padding: 16px 48px 16px 52px;
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
  transition: all var(--transition-fast);
  font-family: inherit;
  letter-spacing: 0.3px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(255, 75, 75, 0.15);
  background: rgba(19, 19, 33, 0.8);
}

.search-input:focus ~ .search-icon {
  opacity: 0.8;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.clear-search {
  position: absolute;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 18px;
  transition: all var(--transition-fast);
  padding: 0;
}

.clear-search:hover {
  color: var(--accent);
  background: rgba(255, 75, 75, 0.15);
  transform: scale(1.1);
}

.clear-search:active {
  transform: scale(0.95);
}

.search-results {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.search-results-info {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 4px;
  margin-bottom: 20px;
  display: flex;
  gap: 4px;
}

.search-results-info strong {
  color: var(--accent);
  font-weight: 600;
}

.search-results-grouped {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  border-radius: 16px;
  background: rgba(19, 19, 33, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.no-results-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.no-results p {
  margin: 8px 0;
  color: var(--text-muted);
}

.no-results p strong {
  color: var(--text-main);
  word-break: break-word;
}

.no-results-sub {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  opacity: 0.8;
}

/* شريط المنصات */
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.chip {
  padding: 10px 20px;
  border-radius: 40px;
  background: var(--bg-chip);
  color: var(--text-muted);
  font-size: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition-fast),
    transform var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast), color var(--transition-fast);
}

.chip span.icon {
  font-size: 18px;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.chip.active {
  background: var(--bg-chip-active);
  color: #fff;
}

/* شبكة الكروت */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.app-group {
  padding-top: 6px;
}

.group-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,75,75,0.25));
  border-radius: 2px;
}

.group-apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  align-items: stretch;
  justify-content: center; /* center the overall grid */
  justify-items: center;
  width: 100%;
  grid-auto-rows: auto;
}

/* Ensure cards have a max width so they don't stretch too wide on large screens */
.card {
  max-width: 320px;
  width: 100%;
}

/* Keep a single card centered and constrained */
.group-apps > .card:only-child {
  justify-self: center;
  width: 320px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8);
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 98px;
  justify-content: flex-start;
}

.card-image {
  background: #000;
  border-radius: 18px;
  padding: 10px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 160px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  display: block;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 13px;
  gap: 8px;
}

.device-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.device-tag {
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4CAF50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  min-height: 28px;
  transition: all 0.3s ease;
  cursor: default;
  white-space: nowrap;
}

.device-tag:hover {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(76, 175, 80, 0.15));
  border-color: rgba(76, 175, 80, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.version-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(120, 144, 156, 0.16);
  color: var(--text-muted);
}

/* Code Badge Styling */
.code-badge-container {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.code-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(50, 50, 70, 0.8);
  border: 1px solid rgba(255, 75, 75, 0.3);
  border-radius: 8px;
  color: #ff9999;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.code-badge:hover {
  background: rgba(50, 50, 70, 1);
  border-color: rgba(255, 75, 75, 0.6);
  color: #ff4b4b;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 12px rgba(255, 75, 75, 0.2);
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 0;
  border-radius: 999px;
  border: none;
  outline: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 0;
}

.download-btn:hover {
  background: #ff6161;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 75, 75, 0.6);
}

.download-btn span.icon {
  font-size: 18px;
}

/* Download Section with Dropdown */
.download-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
}

.more-options-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  padding-top: 12px;
  margin-top: 12px;
  height: 20px;
  background: none;
  border: none;
  border-top: 1px solid rgba(255, 75, 75, 0.15);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: underline;
  line-height: 1;
}

.more-options-btn:hover {
  color: #ff6161;
  border-top-color: rgba(255, 75, 75, 0.4);
  transform: translateY(-1px);
}

.more-options-btn.hidden {
  visibility: hidden;
  cursor: default;
  border-top: 1px solid transparent;
  padding-top: 12px;
  margin-top: 12px;
}

.download-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 75, 75, 0.3);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 10;
  overflow: hidden;
}

.dropdown-content {
  display: flex;
  flex-direction: column;
  max-height: 350px;
  overflow-y: auto;
}

.dropdown-platform {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-platform:last-child {
  border-bottom: none;
}

.dropdown-platform-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dropdown-link {
  display: block;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  color: var(--text-main);
  padding-left: 4px;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-downloads {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.platform-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 2px;
}

.links-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-btn-sm {
  flex: 0 1 auto;
  padding: 8px 14px;
  font-size: 13px;
  min-width: auto;
  justify-content: center;
}

.download-btn-sm span.icon {
  font-size: 16px;
}

footer {
  margin-top: 26px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.7;
}

/* عناصر خاصة بلوحة التحكم */
.admin-bar {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-form {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-form h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.admin-form label {
  display: block;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 14px;
}

.admin-form input,
.admin-form select,
.admin-form button {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #05050a;
  color: var(--text-main);
  font-size: 14px;
}

.admin-form button {
  margin-top: 10px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.admin-form button:hover {
  background: #ff6161;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(19, 19, 33, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checkbox-label:hover {
  border-color: rgba(255, 75, 75, 0.3);
  background: rgba(19, 19, 33, 0.8);
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-text {
  color: var(--accent);
  font-weight: 600;
}

.checkbox-text {
  color: var(--text-main);
  user-select: none;
}

.download-links-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.platform-download-section {
  background: rgba(19, 19, 33, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  width: 100%;
}

.platform-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.download-links-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.download-link-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-family: monospace;
  font-size: 12px;
  min-width: 200px;
}

.download-link-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
}

.remove-link-btn {
  padding: 0;
  border-radius: 2px;
  background: rgba(255, 75, 75, 0.3);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 12px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.remove-link-btn:hover {
  background: rgba(255, 75, 75, 0.6);
}

.add-link-btn {
  padding: 0;
  border-radius: 2px;
  background: rgba(255, 75, 75, 0.3);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 12px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 8px;
}

.add-link-btn:hover {
  background: rgba(255, 75, 75, 0.6);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.admin-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.admin-group {
  background: rgba(19, 19, 33, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.admin-group-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  color: var(--text-main);
}
.group-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
  margin-inline-end: 8px;
  transition: all 0.2s ease;
}
.group-drag-handle:hover {
  color: var(--text-main);
  background: rgba(255, 75, 75, 0.2);
}

.group-rename-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.group-rename-btn:hover {
  color: var(--text-main);
  background: rgba(255, 75, 75, 0.2);
  border-color: rgba(255, 75, 75, 0.3);
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-btn:hover {
  background: rgba(255, 75, 75, 0.2);
  border-color: rgba(255, 75, 75, 0.3);
  transform: translateY(-2px);
}
.admin-group.dragging {
  opacity: 0.6;
  outline: 2px dashed rgba(255, 75, 75, 0.4);
}

.admin-group-summary::-webkit-details-marker {
  display: none;
}

.admin-group-title {
  font-size: 14px;
  letter-spacing: 0.3px;
}

.admin-group-count {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 999px;
}

.admin-group[open] .admin-group-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-inline-group {
  margin-top: 16px;
}

.admin-inline-group .admin-group-summary {
  padding: 10px 12px;
  font-size: 14px;
}

.admin-inline-group .download-links-container {
  padding: 0 14px 14px;
}

.admin-table th,
.admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  text-align: left;
  color: var(--text-muted);
}

/* Platform Labels Styling */
.platform-label {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: capitalize;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.platform-label:hover {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border-color: #4CAF50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.platform-label.selected {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border-color: #4CAF50;
  color: white;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Platforms Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.platform-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #4CAF50;
}

.platform-checkbox label {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 14px;
}

.platform-checkbox input[type="checkbox"]:checked + label {
  color: #4CAF50;
  font-weight: 500;
}

/* موبايل */
/* Admin Dashboard Styling */
.admin-form {
  background: linear-gradient(135deg, rgba(19, 19, 33, 0.8), rgba(13, 13, 22, 0.9));
  border: 1px solid rgba(255, 75, 75, 0.15);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.admin-form h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-form h2::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--accent);
  border-radius: 2px;
}

.admin-form label {
  display: block;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-transform: capitalize;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="email"],
.admin-form input[type="url"] {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus,
.admin-form input[type="email"]:focus,
.admin-form input[type="url"]:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 75, 75, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.admin-form button[type="submit"] {
  margin-top: 28px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent), #ff6161);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.admin-form button[type="submit"]:hover {
  background: linear-gradient(135deg, #ff6161, #ff7070);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 75, 75, 0.3);
}

/* Admin Table Styling */
.admin-list-header {
  margin-bottom: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 75, 75, 0.2);
}

.admin-list-count {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
}

.admin-list-count strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
}

.admin-list-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.admin-reorder-status {
  margin-top: 8px;
  font-size: 13px;
  color: #7bd88f;
}

.admin-reorder-status.error {
  color: #ff9a9a;
}

.admin-table-wrapper {
  background: linear-gradient(135deg, rgba(19, 19, 33, 0.6), rgba(13, 13, 22, 0.7));
  border: 1px solid rgba(255, 75, 75, 0.15);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: rgba(19, 19, 33, 0.9);
  border-bottom: 2px solid rgba(255, 75, 75, 0.2);
}

.admin-table th {
  padding: 16px 12px;
  text-align: left;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 14px;
}

.admin-table-drag {
  width: 60px;
  text-align: center;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
}

.drag-handle:hover {
  color: var(--text-main);
  background: rgba(255, 75, 75, 0.2);
}

.admin-table tbody tr.dragging {
  opacity: 0.5;
  background: rgba(255, 75, 75, 0.1);
}

.admin-table tbody tr:hover {
  background: rgba(255, 75, 75, 0.05);
}

.admin-table-id {
  font-weight: 600;
  color: var(--accent);
  width: 60px;
  text-align: center;
}

.admin-table-title {
  font-weight: 500;
  max-width: 150px;
  word-break: break-word;
}

.admin-table-type {
  color: #80cbc4;
  font-weight: 500;
}

.admin-table-devices {
  color: #4CAF50;
  font-size: 13px;
}

.admin-table-version {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 13px;
}

.admin-table-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid;
}

.action-btn.edit-btn {
  color: #80cbc4;
  border-color: rgba(128, 203, 196, 0.3);
  background: rgba(128, 203, 196, 0.1);
}

.action-btn.edit-btn:hover {
  background: rgba(128, 203, 196, 0.2);
  border-color: rgba(128, 203, 196, 0.6);
}

.action-btn.delete-btn {
  color: var(--accent);
  border-color: rgba(255, 75, 75, 0.3);
  background: rgba(255, 75, 75, 0.1);
}

.action-btn.delete-btn:hover {
  background: rgba(255, 75, 75, 0.2);
  border-color: rgba(255, 75, 75, 0.6);
}

@media (max-width: 600px) {
  header {
    padding: 14px 16px;
  }
  .page {
    padding-inline: 14px;
  }
  .brand-text-sub {
    display: none;
  }
  .admin-form {
    padding: 20px;
  }
  .admin-table {
    font-size: 12px;
  }
  .admin-table th,
  .admin-table td {
    padding: 10px 8px;
  }
}
