/* ئاساسىي ئۆزگەرگۈچىلەر */
:root {
  --primary: #00d4ff;
  --primary-dark: #0099cc;
  --secondary: #ff6b9d;
  --bg-dark: #0a0a0f;
  --bg-card: #14141f;
  --bg-card-light: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --success: #00c853;
  --warning: #ffd700;
  --danger: #ff4757;
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  --gradient-vip: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'UKIJ Ekran', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  direction: rtl;
}

/* ئورتاق ئۇسلۇبلار */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== كىرىش بېتى ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: var(--secondary);
  bottom: -50px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.glow-3 {
  width: 200px;
  height: 200px;
  background: var(--warning);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 4s ease-in-out infinite;
}

.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.1); }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(20, 20, 31, 0.9);
  border-radius: 24px;
  padding: 50px 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.logo-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 204, 0.1) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.logo-wrap i {
  font-size: 36px;
  color: var(--primary);
}

.login-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0 16px;
  height: 56px;
  transition: all 0.3s;
}

.input-group:focus-within {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.input-group i {
  color: var(--text-muted);
  font-size: 18px;
  margin-left: 12px;
}

.input-group input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 16px;
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 28px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
  margin-top: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

.login-footer {
  margin-top: 40px;
  text-align: center;
}

.tech-line {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.5), transparent);
  margin: 0 auto 15px;
}

.login-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== باشقۇرۇش بېتى ===== */
.admin-page {
  display: flex;
  min-height: 100vh;
}

/* يان تىزىملىك */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo i {
  font-size: 28px;
  color: var(--primary);
}

.logo span {
  font-size: 22px;
  font-weight: bold;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.3s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(0, 153, 204, 0.1) 100%);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.nav-item i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid rgba(255, 107, 157, 0.3);
  border-radius: 12px;
  color: var(--secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.logout-btn:hover {
  background: rgba(255, 107, 157, 0.1);
}

/* ئاساسىي مەزمۇن */
.main-content {
  flex: 1;
  margin-right: 260px;
  display: flex;
  flex-direction: column;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
}

.header-left h2 {
  font-size: 22px;
  font-weight: 600;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.admin-info i {
  font-size: 24px;
  color: var(--primary);
}

.content-area {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

/* ستاتىستىكا كارتىلىرى */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.users {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 204, 0.1) 100%);
  color: var(--primary);
}

.stat-icon.movies {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.2) 0%, rgba(255, 107, 157, 0.1) 100%);
  color: var(--secondary);
}

.stat-icon.orders {
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.2) 0%, rgba(0, 200, 83, 0.1) 100%);
  color: var(--success);
}

.stat-icon.income {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 140, 0, 0.1) 100%);
  color: var(--warning);
}

.stat-info h3 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 4px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 14px;
}

/* بەت مەزمۇنى */
.page-content {
  display: none;
}

.page-content.active {
  display: block;
}

.page-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

/* كۇنۇپكىلار */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.2);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* جەدۋەل */
.table-container {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  text-align: right;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 14px;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.status-badge.active {
  background: rgba(0, 200, 83, 0.2);
  color: var(--success);
}

.status-badge.inactive {
  background: rgba(255, 71, 87, 0.2);
  color: var(--danger);
}

.status-badge.vip {
  background: var(--gradient-vip);
  color: #000;
}

.status-badge.pending {
  background: rgba(255, 215, 0, 0.2);
  color: var(--warning);
}

.status-badge.paid {
  background: rgba(0, 200, 83, 0.2);
  color: var(--success);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
  font-size: 18px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(0, 212, 255, 0.5);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* تىل تاللاش */
.lang-switch {
  display: flex;
  gap: 8px;
  margin-left: 20px;
}

.lang-switch.login-lang {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.lang-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: white;
}

/* ئۇسلۇب باشقۇرۇش بېتى */
.styles-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.style-section {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.style-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.style-section-title i {
  color: var(--primary);
  font-size: 24px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.style-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid transparent;
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.style-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.style-card.active::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.style-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.style-preview-inner {
  width: 80%;
  height: 80%;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
}

.style-preview-header {
  height: 8px;
  border-radius: 4px;
  width: 60%;
}

.style-preview-content {
  flex: 1;
  display: flex;
  gap: 8px;
}

.style-preview-sidebar {
  width: 30%;
  border-radius: 4px;
}

.style-preview-main {
  flex: 1;
  border-radius: 4px;
}

.style-info {
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
}

.style-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ئۇسلۇب رەڭلىرى */
.style-card[data-theme="tech-blue"] .style-preview { background: linear-gradient(135deg, #0a0a0f 0%, #14141f 100%); }
.style-card[data-theme="tech-blue"] .style-preview-header { background: #00d4ff; }
.style-card[data-theme="tech-blue"] .style-preview-sidebar { background: rgba(0, 212, 255, 0.2); }
.style-card[data-theme="tech-blue"] .style-preview-main { background: rgba(255, 255, 255, 0.05); }

.style-card[data-theme="purple-dream"] .style-preview,
.style-card[data-theme="midnight-purple"] .style-preview { background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 100%); }
.style-card[data-theme="purple-dream"] .style-preview-header,
.style-card[data-theme="midnight-purple"] .style-preview-header { background: #a855f7; }
.style-card[data-theme="purple-dream"] .style-preview-sidebar,
.style-card[data-theme="midnight-purple"] .style-preview-sidebar { background: rgba(168, 85, 247, 0.2); }
.style-card[data-theme="purple-dream"] .style-preview-main,
.style-card[data-theme="midnight-purple"] .style-preview-main { background: rgba(255, 255, 255, 0.05); }

.style-card[data-theme="green-nature"] .style-preview,
.style-card[data-theme="forest-green"] .style-preview { background: linear-gradient(135deg, #0a1f0a 0%, #1a3a1a 100%); }
.style-card[data-theme="green-nature"] .style-preview-header,
.style-card[data-theme="forest-green"] .style-preview-header { background: #22c55e; }
.style-card[data-theme="green-nature"] .style-preview-sidebar,
.style-card[data-theme="forest-green"] .style-preview-sidebar { background: rgba(34, 197, 94, 0.2); }
.style-card[data-theme="green-nature"] .style-preview-main,
.style-card[data-theme="forest-green"] .style-preview-main { background: rgba(255, 255, 255, 0.05); }

.style-card[data-theme="sunset-orange"] .style-preview,
.style-card[data-theme="warm-sunset"] .style-preview { background: linear-gradient(135deg, #1f0a0a 0%, #3a1a1a 100%); }
.style-card[data-theme="sunset-orange"] .style-preview-header,
.style-card[data-theme="warm-sunset"] .style-preview-header { background: #f97316; }
.style-card[data-theme="sunset-orange"] .style-preview-sidebar,
.style-card[data-theme="warm-sunset"] .style-preview-sidebar { background: rgba(249, 115, 22, 0.2); }
.style-card[data-theme="sunset-orange"] .style-preview-main,
.style-card[data-theme="warm-sunset"] .style-preview-main { background: rgba(255, 255, 255, 0.05); }

.style-card[data-theme="ocean-wave"] .style-preview { background: linear-gradient(135deg, #0a1a2f 0%, #1a3a5f 100%); }
.style-card[data-theme="ocean-wave"] .style-preview-header { background: #06b6d4; }
.style-card[data-theme="ocean-wave"] .style-preview-sidebar { background: rgba(6, 182, 212, 0.2); }
.style-card[data-theme="ocean-wave"] .style-preview-main { background: rgba(255, 255, 255, 0.05); }

.style-card[data-theme="classic-dark"] .style-preview { background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%); }
.style-card[data-theme="classic-dark"] .style-preview-header { background: #3b82f6; }
.style-card[data-theme="classic-dark"] .style-preview-sidebar { background: rgba(59, 130, 246, 0.2); }
.style-card[data-theme="classic-dark"] .style-preview-main { background: rgba(255, 255, 255, 0.05); }

/* RTL/LTR ماسلاشتۇرۇش */
[dir="ltr"] .sidebar {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

[dir="ltr"] .main-content {
  margin-right: 0;
  margin-left: 260px;
}

[dir="ltr"] .login-btn i {
  transform: rotate(180deg);
}

[dir="ltr"] .lang-switch.login-lang {
  right: auto;
  left: 20px;
}

[dir="ltr"] .data-table th,
[dir="ltr"] .data-table td {
  text-align: left;
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .style-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  
  [dir="ltr"] .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-right: 0;
  }
  
  [dir="ltr"] .main-content {
    margin-left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .style-grid {
    grid-template-columns: 1fr;
  }
  
  .lang-switch {
    margin-left: 10px;
  }
}
