/* ==========================================
   AUTH PAGES - Стили для страниц авторизации
   Темная тема в стилистике Craiyon + FreeImg
   ========================================== */

:root {
  --auth-primary: #8b5cf6;
  --auth-primary-hover: #7c3aed;
  --auth-bg: #0b1220;
  --auth-card-bg: linear-gradient(135deg, rgba(15,23,42,.92) 0%, rgba(11,18,32,.95) 100%);
  --auth-border: rgba(139,92,246,.25);
  --auth-text: #e5e7eb;
  --auth-text-muted: #94a3b8;
  --auth-input-bg: rgba(15,23,42,.6);
  --auth-input-border: rgba(139,92,246,.2);
  --auth-input-focus: rgba(139,92,246,.5);
  --auth-error: #ef4444;
  --auth-success: #10b981;
  --transition-speed: 0.3s;
}

/* ==========================================
   GLOBAL STYLES
   ========================================== */

body {
  background: var(--auth-bg);
  background-image: 
    radial-gradient(ellipse 800px 600px at 20% 10%, rgba(139,92,246,.12), transparent),
    radial-gradient(ellipse 1000px 800px at 80% 90%, rgba(99,102,241,.08), transparent);
  min-height: 100vh;
  color: var(--auth-text);
  font-family: system-ui, -apple-system, sans-serif;
}

/* ==========================================
   AUTH CONTAINER
   ========================================== */

.auth-container {
  min-height: calc(100vh - 70px); /* Вычитаем высоту navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

@media (max-width: 767px) {
  .auth-container {
    min-height: calc(100vh - 60px);
    padding: 24px 16px;
  }
}

/* ==========================================
   AUTH CARD
   ========================================== */

.auth-card {
  background: var(--auth-card-bg);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  box-shadow: 
    0 20px 40px rgba(0,0,0,.4),
    0 0 0 1px rgba(139,92,246,.08) inset,
    inset 0 1px 0 rgba(255,255,255,.02);
  padding: 48px;
  max-width: 480px;
  width: 100%;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
}

/* ==========================================
   AUTH HEADER
   ========================================== */

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-logo img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 12px rgba(139,92,246,.4));
}

.auth-logo-text {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: #f1f5f9;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--auth-text-muted);
  margin: 0;
}

@media (max-width: 640px) {
  .auth-title {
    font-size: 24px;
  }
  .auth-subtitle {
    font-size: 14px;
  }
}

/* ==========================================
   GOOGLE BUTTON
   ========================================== */

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(255,255,255,.95);
  color: #1f2937;
  border: 1px solid rgba(209,213,219,.3);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  margin-bottom: 24px;
}

.btn-google:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.btn-google:active {
  transform: translateY(0);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ==========================================
   DIVIDER
   ========================================== */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--auth-text-muted);
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--auth-border), transparent);
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  border-radius: 10px;
  color: var(--auth-text);
  font-size: 15px;
  transition: all var(--transition-speed) ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.1);
}

.form-input::placeholder {
  color: var(--auth-text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--auth-input-focus);
  background: rgba(15,23,42,.8);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,.1),
    0 0 0 3px rgba(139,92,246,.1);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-hover) 100%);
  color: white;
  border: 1px solid rgba(124,58,237,.4);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  box-shadow: 
    0 4px 16px rgba(139,92,246,.35),
    inset 0 1px 0 rgba(255,255,255,.1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(139,92,246,.45),
    inset 0 1px 0 rgba(255,255,255,.15);
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading spinner для кнопок */
.btn-primary.loading {
  pointer-events: none;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   LINKS
   ========================================== */

.auth-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-speed) ease;
}

.auth-link:hover {
  color: var(--auth-primary-hover);
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--auth-text-muted);
}

.auth-footer-link {
  display: block;
  margin-top: 12px;
}

/* ==========================================
   MESSAGES (Error / Success / Info)
   ========================================== */

.message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-error {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
}

.message-success {
  background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7;
}

.message-info {
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
  color: #93c5fd;
}

.message svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ==========================================
   ACCOUNT PAGE SPECIFIC
   ========================================== */

.account-info {
  background: rgba(15,23,42,.6);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.account-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(139,92,246,.1);
}

.account-info-row:last-child {
  border-bottom: none;
}

.account-info-label {
  font-size: 14px;
  color: var(--auth-text-muted);
  font-weight: 500;
}

.account-info-value {
  font-size: 15px;
  color: var(--auth-text);
  font-weight: 600;
  word-break: break-all;
}

.account-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(139,92,246,.2);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 6px;
  font-size: 13px;
  color: #a78bfa;
  font-weight: 600;
}

.account-section {
  margin-bottom: 32px;
}

.account-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 16px 0;
}

.account-placeholder {
  background: rgba(15,23,42,.4);
  border: 2px dashed rgba(139,92,246,.2);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: var(--auth-text-muted);
}

.account-placeholder svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
  .btn-google,
  .btn-primary {
    padding: 12px 20px;
    font-size: 15px;
  }
  
  .form-input {
    padding: 11px 14px;
    font-size: 14px;
  }
  
  .account-info {
    padding: 20px;
  }
  
  .account-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ==========================================
   UTILITIES
   ========================================== */

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* Scoped только для модалки и auth-страниц */
#authModal .hidden,
.auth-container .hidden {
  display: none !important;
}

/* ==========================================
   NEW ACCOUNT PAGE STYLES
   ========================================== */

/* Main card adjustments */
.account-card-main {
  max-width: 720px;
}

/* Account Info Grid */
.account-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.account-info-card {
  background: rgba(15,23,42,.4);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

.account-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--auth-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.account-info-card:hover {
  background: rgba(15,23,42,.6);
  border-color: rgba(139,92,246,.4);
  transform: translateY(-2px);
}

.account-info-card:hover::before {
  opacity: 1;
}

.account-info-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(139,92,246,.2) 0%, rgba(99,102,241,.2) 100%);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-speed) ease;
}

.account-info-icon.icon-success {
  background: linear-gradient(135deg, rgba(16,185,129,.2) 0%, rgba(5,150,105,.2) 100%);
  border-color: rgba(16,185,129,.3);
}

.account-info-icon.icon-error {
  background: linear-gradient(135deg, rgba(239,68,68,.2) 0%, rgba(220,38,38,.2) 100%);
  border-color: rgba(239,68,68,.3);
}

.account-info-card:hover .account-info-icon {
  transform: scale(1.05);
}

.account-info-icon svg {
  width: 24px;
  height: 24px;
  color: var(--auth-primary);
}

.account-info-icon.icon-success svg {
  color: #6ee7b7;
}

.account-info-icon.icon-error svg {
  color: #fca5a5;
}

.account-info-content {
  flex: 1;
  min-width: 0;
}

.account-info-label {
  font-size: 13px;
  color: var(--auth-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-info-value {
  font-size: 15px;
  color: var(--auth-text);
  font-weight: 600;
  word-break: break-word;
}

.account-info-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-id-short {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  color: var(--auth-text);
  font-weight: 600;
  background: rgba(139,92,246,.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.copy-btn {
  width: 32px;
  height: 32px;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(139,92,246,.25);
  border-color: rgba(139,92,246,.5);
  transform: scale(1.05);
}

.copy-btn.copied {
  background: rgba(16,185,129,.2);
  border-color: rgba(16,185,129,.4);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
  color: var(--auth-primary);
}

.copy-btn.copied svg {
  color: #6ee7b7;
}

.badge-success {
  background: rgba(16,185,129,.2) !important;
  border-color: rgba(16,185,129,.3) !important;
  color: #6ee7b7 !important;
}

.badge-error {
  background: rgba(239,68,68,.2) !important;
  border-color: rgba(239,68,68,.3) !important;
  color: #fca5a5 !important;
}

/* Plan Card */
.plan-card {
  background: linear-gradient(135deg, rgba(139,92,246,.08) 0%, rgba(99,102,241,.08) 100%);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.plan-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-hover) 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(139,92,246,.3);
  position: relative;
  z-index: 1;
}

.plan-description {
  font-size: 15px;
  color: var(--auth-text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.plan-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-text);
  font-size: 14px;
}

.plan-feature svg {
  width: 20px;
  height: 20px;
  color: #6ee7b7;
  flex-shrink: 0;
}

.btn-upgrade {
  width: 100%;
  margin-top: 20px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.btn-upgrade:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,158,11,.4);
}

.btn-upgrade:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-upgrade svg {
  width: 20px;
  height: 20px;
}

/* Premium Upgrade Button */
.btn-upgrade-premium {
  width: 100%;
  margin-top: 24px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
  background-size: 200% 100%;
  color: white;
  border: 2px solid rgba(245,158,11,.6);
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 
    0 4px 20px rgba(245,158,11,.4),
    inset 0 1px 0 rgba(255,255,255,.3),
    inset 0 -1px 0 rgba(0,0,0,.2);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* Shine effect */
.btn-upgrade-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transition: left 0.6s ease;
}

.btn-upgrade-premium:hover::before {
  left: 100%;
}

/* Glow effect */
.btn-upgrade-premium::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706, #b45309);
  border-radius: 14px;
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  transition: opacity var(--transition-speed) ease;
}

.btn-upgrade-premium:hover {
  transform: translateY(-3px) scale(1.02);
  background-position: 100% 0;
  border-color: rgba(251,191,36,.8);
  box-shadow: 
    0 8px 30px rgba(245,158,11,.6),
    0 0 40px rgba(245,158,11,.3),
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -1px 0 rgba(0,0,0,.2);
  animation: pulse-glow 2s ease-in-out infinite;
}

.btn-upgrade-premium:hover::after {
  opacity: 1;
}

.btn-upgrade-premium:active {
  transform: translateY(-1px) scale(1.01);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 
      0 8px 30px rgba(245,158,11,.6),
      0 0 40px rgba(245,158,11,.3),
      inset 0 1px 0 rgba(255,255,255,.4),
      inset 0 -1px 0 rgba(0,0,0,.2);
  }
  50% {
    box-shadow: 
      0 12px 40px rgba(245,158,11,.7),
      0 0 60px rgba(245,158,11,.5),
      inset 0 1px 0 rgba(255,255,255,.5),
      inset 0 -1px 0 rgba(0,0,0,.2);
  }
}

.btn-upgrade-premium svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
  transition: transform var(--transition-speed) ease;
}

.btn-upgrade-premium:hover svg:first-child {
  animation: sparkle 1.5s ease-in-out infinite;
}

.btn-upgrade-premium:hover svg:last-child {
  transform: translateX(4px);
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(90deg); }
  50% { transform: scale(1) rotate(180deg); }
  75% { transform: scale(1.2) rotate(270deg); }
}

.btn-upgrade-premium span {
  position: relative;
  z-index: 1;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: rgba(15,23,42,.4);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 16px;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.stat-card:hover {
  border-color: rgba(139,92,246,.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.stat-icon.generation {
  background: linear-gradient(135deg, rgba(139,92,246,.2) 0%, rgba(99,102,241,.2) 100%);
  border: 1px solid rgba(139,92,246,.3);
}

.stat-icon.upscale {
  background: linear-gradient(135deg, rgba(59,130,246,.2) 0%, rgba(37,99,235,.2) 100%);
  border: 1px solid rgba(59,130,246,.3);
}

.stat-icon.remove-bg {
  background: linear-gradient(135deg, rgba(236,72,153,.2) 0%, rgba(219,39,119,.2) 100%);
  border: 1px solid rgba(236,72,153,.3);
}

.stat-icon svg {
  width: 28px;
  height: 28px;
}

.stat-icon.generation svg {
  color: #a78bfa;
}

.stat-icon.upscale svg {
  color: #60a5fa;
}

.stat-icon.remove-bg svg {
  color: #f472b6;
}

.stat-content {
  position: relative;
  z-index: 1;
}

.stat-title {
  font-size: 14px;
  color: var(--auth-text-muted);
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--auth-text);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-separator {
  font-size: 24px;
  color: var(--auth-text-muted);
  font-weight: 400;
}

.stat-progress {
  width: 100%;
  height: 8px;
  background: rgba(15,23,42,.6);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.2);
}

.stat-progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.stat-progress-bar.low {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 10px rgba(16,185,129,.5);
}

.stat-progress-bar.medium {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 10px rgba(245,158,11,.5);
}

.stat-progress-bar.high {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 10px rgba(239,68,68,.5);
}

.stat-footer {
  font-size: 12px;
  color: var(--auth-text-muted);
  font-style: italic;
}

/* Gallery Stats Card */
.gallery-stats-card {
  background: rgba(15,23,42,.4);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  align-items: center;
}

.gallery-stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gallery-stat-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(139,92,246,.2) 0%, rgba(99,102,241,.2) 100%);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gallery-stat-icon.favorites {
  background: linear-gradient(135deg, rgba(239,68,68,.2) 0%, rgba(220,38,38,.2) 100%);
  border-color: rgba(239,68,68,.3);
}

.gallery-stat-icon svg {
  width: 24px;
  height: 24px;
  color: var(--auth-primary);
}

.gallery-stat-icon.favorites svg {
  color: #fca5a5;
}

.gallery-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--auth-text);
  line-height: 1;
}

.gallery-stat-label {
  font-size: 13px;
  color: var(--auth-text-muted);
  margin-top: 4px;
}

.btn-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.2) 0%, rgba(99,102,241,.2) 100%);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 12px;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-speed) ease;
  white-space: nowrap;
}

.btn-gallery:hover {
  background: linear-gradient(135deg, rgba(139,92,246,.3) 0%, rgba(99,102,241,.3) 100%);
  border-color: rgba(139,92,246,.5);
  transform: translateY(-2px);
}

.btn-gallery svg {
  width: 18px;
  height: 18px;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  background: rgba(15,23,42,.4);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  color: var(--auth-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-speed) ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quick-action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.1) 0%, rgba(99,102,241,.1) 100%);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.quick-action-btn:hover {
  border-color: rgba(139,92,246,.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.quick-action-btn:hover::before {
  opacity: 1;
}

.quick-action-btn svg {
  width: 32px;
  height: 32px;
  color: var(--auth-primary);
  transition: all var(--transition-speed) ease;
  position: relative;
  z-index: 1;
}

.quick-action-btn:hover svg {
  transform: scale(1.1);
}

.quick-action-btn span {
  position: relative;
  z-index: 1;
}

/* Account Actions */
.account-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(139,92,246,.1);
}

.btn-logout {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(239,68,68,.4);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
}

.btn-logout:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(239,68,68,.4);
}

.btn-logout svg {
  width: 20px;
  height: 20px;
}

.spinner-icon {
  animation: spin 0.8s linear infinite;
}

/* Loading Spinner */
.loading-spinner-container {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139,92,246,.2);
  border-top-color: var(--auth-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .account-info-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-stats-card {
    grid-template-columns: 1fr;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .stat-value {
    font-size: 28px;
  }
  
  .account-card-main {
    padding: 32px 20px;
  }
  
  .plan-card {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .account-info-card {
    flex-direction: column;
    text-align: center;
  }
  
  .account-info-icon {
    margin: 0 auto;
  }
  
  .stat-icon {
    width: 48px;
    height: 48px;
  }
  
  .stat-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .stat-value {
    font-size: 24px;
  }
}
