/* ==========================================================
   🎨 PIXTERRA — templates.css (v2025.11.07)
   Интерфейсные элементы: карточки, профили, таблицы, кнопки, админка
   ========================================================== */


/* ===============================
   🧩 GENERAL UI COMPONENTS
   =============================== */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.btn-gradient {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  transition: all 0.2s ease-in-out;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, #5a6de0, #6d3e9d);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.alert {
  border-radius: 10px;
}

/* ===============================
   👤 PROFILE PAGE
   =============================== */
.profile-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  background: #fff;
}

.profile-avatar {
  position: relative;
  display: inline-block;
}

.avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #667eea;
  transition: transform 0.3s ease;
}

.avatar-img:hover {
  transform: scale(1.05);
}

.avatar-actions {
  position: absolute;
  bottom: 0;
  right: 0;
}

.stat-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.stat-item strong {
  color: #667eea;
}

/* ===============================
   📊 DASHBOARD / STATS CARDS
   =============================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-card {
  position: relative;
  border-radius: 15px;
  padding: 20px;
  color: white;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stats-card-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.stats-card-success { background: linear-gradient(135deg, #28a745, #20c997); }
.stats-card-info    { background: linear-gradient(135deg, #17a2b8, #6f42c1); }
.stats-card-warning { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.stats-card-danger  { background: linear-gradient(135deg, #dc3545, #e83e8c); }

.stats-number {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.stats-label {
  font-size: 0.9rem;
  opacity: 0.9;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===============================
   📋 TABLES
   =============================== */
.admin-table-container {
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid #dee2e6;
}

.table thead {
  background: #f0f0f5;
}

/* ===============================
   💼 ADMIN PANEL (Glass Theme)
   =============================== */
body.admin-body {
  background: radial-gradient(circle at 30% 50%, #1e1735 0%, #0d0a1a 100%);
  color: #fff;
  min-height: 100vh;
}

.admin-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 0 25px rgba(118, 75, 162, 0.25);
  margin-bottom: 25px;
  color: #fff;
  transition: transform .2s ease, box-shadow .3s ease;
}

.admin-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(118, 75, 162, 0.4);
}

.admin-card .card-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 20px 20px 0 0;
  font-weight: 600;
  color: #fff;
}

.stats-card.admin {
  backdrop-filter: blur(10px);
  border-radius: 20px;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.admin-btn-primary:hover {
  box-shadow: 0 0 15px rgba(118, 75, 162, 0.5);
}

/* ===============================
   💬 SUPPORT PAGE
   =============================== */
.support-container { max-width: 1100px; }

.ticket-messages {
  max-height: 450px;
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
}

.message-bubble {
  border-radius: 15px;
  padding: 10px 15px;
  max-width: 75%;
  margin-bottom: 10px;
}

.user-message .message-bubble {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  margin-left: auto;
}

.admin-message .message-bubble {
  background: #e9ecef;
  color: #333;
}

/* ===============================
   🧠 LEVELS / LEADERBOARD
   =============================== */
.level-circle {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.level-number {
  font-size: 2.8rem;
  font-weight: bold;
}

.progress {
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  height: 22px;
}

.progress-bar {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

/* ===============================
   📱 MOBILE ADAPTATION
   =============================== */
@media (max-width: 768px) {
  .cards-grid { grid-template-columns: 1fr; }

  .stats-card {
    padding: 15px;
    font-size: 0.95rem;
  }

  .profile-card { margin: 0 10px; }

  .support-container,
  .leaderboard-container {
    padding: 0 10px;
  }

  .level-circle {
    width: 110px;
    height: 110px;
    font-size: 0.9rem;
  }
}
