/* Admin Panel - Advanced Visual Status System */

:root {
  --bg-deep: #030508;
  --bg-card: rgba(10, 12, 24, 0.92);
  --primary: #00E5FF;
  --primary-glow: rgba(0, 229, 255, 0.4);
  --secondary: #9B7CFF;
  --secondary-glow: rgba(155, 124, 255, 0.4);
  --danger: #FF3366;
  --danger-glow: rgba(255, 51, 102, 0.5);
  --success: #2EE59D;
  --success-glow: rgba(46, 229, 157, 0.4);
  --warning: #FFD166;
  --text: #EEF3FF;
  --text-muted: rgba(238, 243, 255, 0.5);
  --border: rgba(0, 229, 255, 0.12);
  --shadow: 0 25px 80px rgba(0,0,0,.70);
  --shadow2: 0 15px 45px rgba(0,0,0,.55);
  
  --status-red: #FF3366;
  --status-green: #2EE59D;
  --status-yellow: #FFD166;
  --status-blue: #00E5FF;
  --status-gray: #666;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', 'Consolas', 'Monaco', monospace;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
}

/* Banner Background */
.banner-bg {
  position: fixed;
  inset: 0;
  background-image: url('../images/Banner Site.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: -3;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 1200px 800px at 20% 20%, rgba(0, 229, 255, 0.10), transparent 55%),
    radial-gradient(ellipse 1000px 700px at 80% 80%, rgba(155, 124, 255, 0.08), transparent 55%),
    radial-gradient(ellipse 800px 600px at 50% 50%, rgba(255, 51, 102, 0.04), transparent 60%),
    linear-gradient(180deg, #030508 0%, #080d1f 100%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    linear-gradient(rgba(0, 229, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.012) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  animation: gridMove 40s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Header */
.header {
  background: linear-gradient(180deg, rgba(8, 18, 44, 0.95), rgba(5, 12, 30, 0.88));
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.40);
}

.header-content {
  text-align: left;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn-config {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.btn-config:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.35);
}

.btn-config.secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-config.alert {
  background: linear-gradient(135deg, #FF3366, #FF8A3D);
  color: #fff;
}

.btn-config.secondary:hover,
.btn-config.alert:hover {
  color: #fff;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent);
  animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.header h1 {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 3px;
  margin: 0;
  animation: gradientShift 4s ease infinite;
}

.header p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0 0;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.header p {
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'Consolas', monospace;
  letter-spacing: 1px;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 20px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.tab-btn {
  padding: 14px 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 10px;
}

.tab-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 25px;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.backup-footnote {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 13px;
}

.backup-footnote strong {
  color: var(--text);
}

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

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 229, 255, 0.1);
}

.card h3 {
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3::before {
  content: '▸';
  color: var(--secondary);
}

/* Status Grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.status-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.status-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

.status-item:hover {
  background: rgba(0, 229, 255, 0.05);
  border-color: var(--primary);
}

.status-item:hover::before {
  opacity: 1;
}

.status-core {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 0 auto 12px;
  position: relative;
}

.status-core.green { 
  background: var(--status-green); 
  box-shadow: 0 0 15px var(--status-green), inset 0 0 10px rgba(255,255,255,0.3);
}

.status-core.red { 
  background: var(--status-red); 
  box-shadow: 0 0 15px var(--status-red), inset 0 0 10px rgba(255,255,255,0.3);
  animation: pulse 1s infinite;
}

.status-core.yellow { 
  background: var(--status-yellow); 
  box-shadow: 0 0 15px var(--status-yellow), inset 0 0 10px rgba(255,255,255,0.3);
}

.status-core.blue { 
  background: var(--status-blue); 
  box-shadow: 0 0 15px var(--status-blue), inset 0 0 10px rgba(255,255,255,0.3);
}

.status-core.gray { 
  background: var(--status-gray); 
}

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

.status-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 1.5px;
}

.status-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--text);
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input, .form-select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #ff6b8a);
  color: #fff;
}

.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 51, 102, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #5fffa8);
  color: #000;
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(46, 229, 157, 0.4);
}

.btn-small {
  padding: 8px 16px;
  font-size: 11px;
}

/* Table */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th, .table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table th {
  color: var(--primary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(0, 0, 0, 0.3);
}

.table th:first-child {
  border-radius: 10px 0 0 0;
}

.table th:last-child {
  border-radius: 0 10px 0 0;
}

.table tr {
  transition: background 0.2s;
}

.table tr:hover {
  background: rgba(0, 229, 255, 0.05);
}

.role-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.role-badge.dev { 
  background: rgba(255, 51, 102, 0.2); 
  color: var(--danger);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.role-badge.admin { 
  background: rgba(46, 229, 157, 0.2); 
  color: var(--success);
  border: 1px solid rgba(46, 229, 157, 0.3);
}

.role-badge.user { 
  background: rgba(0, 229, 255, 0.2); 
  color: var(--primary);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Alert */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  display: none;
  animation: slideIn 0.3s;
}

.alert.show { display: block; }
.alert.success { 
  background: rgba(46, 229, 157, 0.15); 
  color: var(--success); 
  border: 1px solid rgba(46, 229, 157, 0.3);
}
.alert.error { 
  background: rgba(255, 51, 102, 0.15); 
  color: var(--danger); 
  border: 1px solid rgba(255, 51, 102, 0.3);
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
}

/* Navigation */
.nav-links {
  text-align: center;
  padding: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.nav-links a:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--primary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s;
}

.modal.show { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  max-width: 480px;
  width: 90%;
  position: relative;
  overflow: hidden;
  animation: modalSlide 0.3s;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--danger));
}

@keyframes modalSlide {
  from { transform: scale(0.9) translateY(-20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal h4 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 16px;
  letter-spacing: 1px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-buttons .btn {
  flex: 1;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  z-index: 1000;
  animation: toastSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.success {
  background: linear-gradient(135deg, var(--success), #5fffa8);
  color: #000;
}

.toast.error {
  background: linear-gradient(135deg, var(--danger), #ff6b8a);
  color: #fff;
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-item {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
  .tabs {
    gap: 3px;
    padding: 15px 10px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 10px;
  }
  
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header h1 {
    font-size: 22px;
  }
}

/* Videos List */
.videos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid var(--border2);
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-info strong {
  color: var(--text);
  font-size: 14px;
}

.video-info span {
  color: var(--text-muted);
  font-size: 12px;
}

.video-info small {
  color: var(--text-muted2);
  font-size: 11px;
}

.video-actions {
  display: flex;
  gap: 8px;
}

/* Alert */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  display: none;
}

.alert.show { display: block; }
.alert.success { 
  background: rgba(46, 229, 157, 0.15); 
  color: var(--success); 
  border: 1px solid rgba(46, 229, 157, 0.3);
}
.alert.error { 
  background: rgba(255, 51, 102, 0.15); 
  color: var(--danger); 
  border: 1px solid rgba(255, 51, 102, 0.3);
}
.alert.info { 
  background: rgba(0, 229, 255, 0.15); 
  color: var(--primary); 
  border: 1px solid rgba(0, 229, 255, 0.3);
}
