/* Fox Arcade - Colorful Cartoon Admin CMS Dashboard Styles */

.admin-body {
  background: #f4f7fe;
  display: flex;
  min-height: 100vh;
  color: #1e293b;
}

/* Sidebar Navigation */
.admin-sidebar {
  width: 250px;
  background: #ffffff;
  border-right: 3px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.02);
}

.admin-brand {
  padding: 12px 16px;
  border-bottom: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-brand img {
  height: 30px;
}

.admin-badge {
  background: #fef08a;
  border: 2px solid #facc15;
  color: #854d0e;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 0 #eab308;
}

.admin-nav {
  list-style: none;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}

.admin-nav::-webkit-scrollbar {
  width: 4px;
}
.admin-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 10px;
  color: #475569;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  border: 1.5px solid transparent;
}

.admin-nav-item:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #e2e8f0;
  transform: translateX(3px);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, #0ea5e9, #4f46e5);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 0 #0284c7, 0 4px 10px rgba(14, 165, 233, 0.22);
  transform: translateX(3px);
}

/* 2D Single-Color Cartoon SVG Icons */
.admin-nav-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s;
}

.admin-nav-item:hover .admin-nav-svg {
  transform: scale(1.15) rotate(-3deg);
}

.admin-nav-item.active .admin-nav-svg {
  color: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* Single-Color Cartoon Palette per Category */
.nav-icon-dashboard  { color: #0284c7; }
.nav-icon-games      { color: #8b5cf6; }
.nav-icon-addgames   { color: #10b981; }
.nav-icon-blog       { color: #f97316; }
.nav-icon-categories { color: #06b6d4; }
.nav-icon-ads        { color: #eab308; }
.nav-icon-analytics  { color: #ec4899; }
.nav-icon-reports    { color: #ef4444; }
.nav-icon-cron       { color: #f59e0b; }
.nav-icon-backup     { color: #6366f1; }
.nav-icon-settings   { color: #64748b; }

.admin-sidebar-footer {
  padding: 8px 10px;
  border-top: 3px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.admin-sidebar-footer .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  line-height: 1.2;
}

/* Main Content Area */
.admin-main {
  margin-left: 250px;
  flex: 1;
  padding: 28px 36px;
  max-width: 1350px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-title {
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e1b4b;
}

/* Colorful KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 34px;
}

.kpi-card {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 0 #cbd5e1, 0 10px 20px rgba(0, 0, 0, 0.04);
}

.kpi-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #f0f7ff;
  border: 2px solid #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.kpi-info h4 {
  font-family: var(--font-display);
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 800;
}

.kpi-info .kpi-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #1e1b4b;
  margin-top: 2px;
}

/* Data Cards & Tables */
.admin-card {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 30px;
  box-shadow: 0 8px 0 #cbd5e1, 0 12px 24px rgba(0, 0, 0, 0.04);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-table th {
  background: #f8fafc;
  padding: 14px 16px;
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 800;
  border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.table-thumb {
  width: 52px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #1e293b;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: #0ea5e9;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Switch Toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 26px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: #10b981;
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Action Icons */
.action-icon-btn {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  color: #475569;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-right: 4px;
}

.action-icon-btn:hover {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
  transform: translateY(-2px);
}

.action-icon-btn.delete:hover {
  background: #ff3b70;
  color: #ffffff;
  border-color: #ff3b70;
}

/* View Sections */
.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
}

@media (max-width: 900px) {
  .admin-sidebar {
    width: 60px;
  }
  .admin-brand span, .admin-nav-item span, .admin-badge {
    display: none;
  }
  .admin-main {
    margin-left: 60px;
    padding: 20px;
  }
}

/* Unified Admin Refresh Button (Perfect Circle) */
.btn-refresh-admin {
  background: #ffffff;
  color: #1e1b4b;
  border: 2px solid #e2e8f0;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden !important;
  white-space: nowrap !important;
  user-select: none;
}

.btn-refresh-admin:hover {
  background: #f8fafc;
  border-color: #6366f1;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
  transform: scale(1.06);
}

.btn-refresh-admin:active,
.btn-refresh-admin.is-refreshing {
  transform: scale(0.94);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  border-color: #0284c7;
  background: #f0f9ff;
}

.btn-refresh-admin.is-updated {
  border-color: #16a34a !important;
  background: #f0fdf4 !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25) !important;
  transform: scale(1.04);
}

.btn-refresh-admin .refresh-icon {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.btn-refresh-admin .refresh-icon.rotating,
.btn-refresh-admin.is-refreshing .refresh-icon {
  animation: adminRefreshSpin 0.75s linear infinite;
}

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