/* ============================================
   KADRIBOT v4.0 - COSMIC UI COMPONENTS
   Повна переробка всіх компонентів
   ============================================ */

/* ===========================================
   PAGE LAYOUT - COSMIC
   =========================================== */

.page {
  padding: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.5s ease-out;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .page {
    padding: var(--space-md);
  }
}

.page-header {
  margin-bottom: var(--space-xl);
  position: relative;
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  letter-spacing: -0.02em;
}

.page-title-icon {
  font-size: 1.2em;
  filter: drop-shadow(0 0 10px var(--accent-primary));
  animation: float 3s ease-in-out infinite;
}

.page-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ===========================================
   CARDS - COSMIC GLASS MORPHISM
   =========================================== */

.card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

/* Градієнтна рамка */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

/* Світіння на hover */
.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    var(--glow-primary);
  border-color: var(--border-glow);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  opacity: 0.15;
}

.card:active {
  transform: translateY(-4px) scale(0.98);
}

@media (max-width: 768px) {
  .card {
    padding: var(--space-md);
  }
  
  .card:hover {
    transform: translateY(-4px);
  }
}

/* Card variants */
.card-elevated {
  background: var(--bg-elevated);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-interactive {
  cursor: pointer;
}

.card-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ===========================================
   DOCUMENT CARDS - COSMIC STYLE
   =========================================== */

.document-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

/* Вертикальна лінія-індикатор */
.document-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition-bounce);
  border-radius: 0 4px 4px 0;
}

/* Shimmer ефект */
.document-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(99, 102, 241, 0.1),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.document-card:hover {
  transform: translateX(8px) translateY(-4px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    -4px 0 20px rgba(99, 102, 241, 0.2);
  border-color: var(--border-glow);
}

.document-card:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.document-card:hover::after {
  left: 100%;
}

.document-card:active {
  transform: translateX(4px) translateY(-2px) scale(0.98);
}

.document-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.document-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  align-items: center;
}

.document-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

/* ===========================================
   BUTTONS - COSMIC NEON
   =========================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: 
    0 4px 20px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

/* Ripple ефект */
.button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

/* Shimmer ефект */
.button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: button-shimmer 3s infinite;
}

@keyframes button-shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 30px rgba(99, 102, 241, 0.5),
    0 0 40px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button:hover::before {
  width: 300px;
  height: 300px;
}

.button:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Button variants */
.button-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  box-shadow: none;
}

.button-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

.button-ghost {
  background: transparent;
  color: var(--accent-primary);
  box-shadow: none;
  padding: var(--space-sm) var(--space-md);
}

.button-ghost:hover {
  background: var(--bg-glass);
  box-shadow: none;
}

.button-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.button-danger:hover {
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

.button-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.button-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.button-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.button-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ===========================================
   INPUTS - COSMIC GLOW
   =========================================== */

.search-box,
.form-input,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all var(--transition-base);
  position: relative;
}

.search-box:hover,
.form-input:hover,
.form-textarea:hover,
input:hover,
textarea:hover,
select:hover {
  border-color: var(--border-glow);
  background: var(--bg-elevated);
}

.search-box:focus,
.form-input:focus,
.form-textarea:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
  box-shadow: 
    var(--glow-primary),
    inset 0 0 20px rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder,
.search-box::placeholder {
  color: var(--text-muted);
}

/* Select styling */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238080a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  background-size: 16px;
  padding-right: 48px;
  cursor: pointer;
}

select option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: var(--space-md);
}

/* Input error state */
input.error,
textarea.error,
select.error {
  border-color: var(--error);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  animation: input-shake 0.5s ease;
}

@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Form elements */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

/* ===========================================
   SEARCH BOX - COSMIC
   =========================================== */

.search-container {
  position: relative;
  margin-bottom: var(--space-lg);
}

.search-box {
  padding-left: 48px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-base);
}

.search-box:focus + .search-icon,
.search-box:focus ~ .search-icon {
  color: var(--accent-primary);
}

/* ===========================================
   BADGES - COSMIC PILLS
   =========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

.badge-primary {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  border-color: rgba(99, 102, 241, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-cyan {
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-cyan);
  border-color: rgba(34, 211, 238, 0.3);
}

.badge-pink {
  background: rgba(236, 72, 153, 0.2);
  color: var(--accent-pink);
  border-color: rgba(236, 72, 153, 0.3);
}

/* ===========================================
   GRID SYSTEM - RESPONSIVE
   =========================================== */

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 768px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   EMPTY STATE - COSMIC
   =========================================== */

.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-secondary);
  animation: fadeIn 0.5s ease-out;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.6;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--accent-primary));
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state-text {
  font-size: var(--text-base);
  color: var(--text-tertiary);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===========================================
   ERROR MESSAGE - COSMIC
   =========================================== */

.error-message {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  color: var(--error);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
  animation: slideUp 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.success-message {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

/* ===========================================
   DOCUMENT CONTENT - COSMIC
   =========================================== */

.document-content {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* ===========================================
   SKELETON LOADING - COSMIC PULSE
   =========================================== */

.skeleton-card {
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.skeleton-title,
.skeleton-text {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-elevated) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-title {
  height: 24px;
  width: 70%;
  margin-bottom: var(--space-md);
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: var(--space-sm);
}

.skeleton-text:last-child {
  width: 60%;
}

/* ===========================================
   DIVIDERS
   =========================================== */

.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-glow),
    transparent
  );
  margin: var(--space-lg) 0;
}

/* ===========================================
   TOOLTIPS
   =========================================== */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--border);
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* ===========================================
   NAVIGATION DOTS - COSMIC
   =========================================== */

.nav-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-dot:hover {
  background: var(--accent-primary);
  transform: scale(1.2);
}

.nav-dot.active {
  background: var(--accent-primary);
  box-shadow: var(--glow-primary);
  width: 24px;
  border-radius: var(--radius-full);
}

/* ===========================================
   TABS - COSMIC
   =========================================== */

.tabs {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.tab {
  flex: 1;
  padding: var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--glow-primary);
}

/* ===========================================
   PROGRESS BAR - COSMIC
   =========================================== */

.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* ===========================================
   AVATAR - COSMIC
   =========================================== */

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: var(--text-lg);
  border: 2px solid var(--bg-secondary);
  box-shadow: var(--glow-primary);
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--text-sm); }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-xl); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--text-3xl); }

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ===========================================
   FLOATING ACTION BUTTON - COSMIC
   =========================================== */

.fab {
  position: fixed;
  bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  right: var(--space-lg);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 30px rgba(99, 102, 241, 0.5),
    var(--glow-primary);
  transition: all var(--transition-base);
  z-index: 100;
}

.fab:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 
    0 12px 40px rgba(99, 102, 241, 0.6),
    0 0 60px rgba(99, 102, 241, 0.4);
}

.fab:active {
  transform: scale(0.95);
}

/* ===========================================
   SECTION TRANSITIONS
   =========================================== */

.section {
  opacity: 0;
  transform: translateY(30px);
  animation: section-appear 0.6s ease-out forwards;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }

@keyframes section-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/**
 * KadriBot - Modern Animation System
 * Динамичные анимации для всех компонентов
 */

/* ============================================
   ANIMATED GRADIENTS - Живые фоны
   ============================================ */

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes gradient-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animated-gradient-bg {
  background: linear-gradient(
    -45deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1),
    rgba(59, 130, 246, 0.1),
    rgba(16, 185, 129, 0.1)
  );
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

.dark .animated-gradient-bg {
  background: linear-gradient(
    -45deg,
    rgba(102, 126, 234, 0.05),
    rgba(118, 75, 162, 0.05),
    rgba(59, 130, 246, 0.05),
    rgba(16, 185, 129, 0.05)
  );
  background-size: 400% 400%;
}

/* Mesh gradient background */
.mesh-gradient-bg {
  position: relative;
  overflow: hidden;
}

.mesh-gradient-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(102, 126, 234, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(16, 185, 129, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(59, 130, 246, 0.15) 0%,
      transparent 50%
    );
  animation: gradient-rotate 30s linear infinite;
  opacity: 0.6;
  z-index: 0;
}

.dark .mesh-gradient-bg::before {
  opacity: 0.3;
}

/* ============================================
   FLOATING PARTICLES - Плавающие частицы
   ============================================ */

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes float-horizontal {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(20px);
  }
}

.floating-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 50%;
  opacity: 0;
  animation: float-up 10s linear infinite;
}

/* ============================================
   CARD ANIMATIONS - Карточки
   ============================================ */

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-hover-glow {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
  }
  50% {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
  }
}

.animated-card {
  position: relative;
  animation: card-enter 0.5s ease-out;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-card:hover {
  transform: translateY(-4px);
  animation: card-hover-glow 2s ease-in-out infinite;
}

.animated-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.3),
    rgba(16, 185, 129, 0.3)
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.animated-card:hover::before {
  opacity: 1;
}

/* ============================================
   GLASSMORPHISM - Эффект стекла
   ============================================ */

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dark .glass-card {
  background: rgba(23, 33, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================
   SHIMMER EFFECT - Блеск при загрузке
   ============================================ */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ============================================
   PULSE ANIMATION - Пульсация
   ============================================ */

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================
   RIPPLE EFFECT - Эффект волны
   ============================================ */

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  animation: ripple 0.6s ease-out;
}

/* ============================================
   SLIDE & FADE ANIMATIONS
   ============================================ */

@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-down {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-in-up {
  animation: slide-in-up 0.4s ease-out;
}

.slide-in-down {
  animation: slide-in-down 0.4s ease-out;
}

.slide-in-left {
  animation: slide-in-left 0.4s ease-out;
}

.slide-in-right {
  animation: slide-in-right 0.4s ease-out;
}

.fade-in {
  animation: fade-in 0.3s ease-out;
}

/* =======/* ===========================================
 * ADVANCED DRAMATIC ANIMATIONS v3.0
 * =========================================== */

/* Ripple effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  animation: ripple 0.6s ease-out;
}

/* Magnetic hover effect */
@keyframes magnetic-pull {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}

.magnetic:hover {
  animation: magnetic-pull 0.3s ease-in-out;
}

/* Neon glow */
@keyframes neon-glow {
  0%, 100% {
    box-shadow: 
      0 0 10px rgba(102, 126, 234, 0.5),
      0 0 20px rgba(102, 126, 234, 0.3),
      0 0 30px rgba(102, 126, 234, 0.2);
  }
  50% {
    box-shadow: 
      0 0 20px rgba(102, 126, 234, 0.8),
      0 0 40px rgba(102, 126, 234, 0.6),
      0 0 60px rgba(102, 126, 234, 0.4);
  }
}

.neon-glow {
  animation: neon-glow 2s ease-in-out infinite;
}

/* Typewriter effect */
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid;
  white-space: nowrap;
  animation: typewriter 3s steps(40) 1s 1 normal both;
}

/* Bounce attention */
@keyframes bounce-attention {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

.bounce-attention {
  animation: bounce-attention 2s ease-in-out;
}

/* Flip card */
@keyframes flip-card {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(180deg); }
}

.flip-card {
  animation: flip-card 0.6s ease-in-out;
  transform-style: preserve-3d;
}

/* Zoom blur in */
@keyframes zoom-blur-in {
  0% {
    transform: scale(0.8);
    filter: blur(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    filter: blur(0);
    opacity: 1;
  }
}

.zoom-blur-in {
  animation: zoom-blur-in 0.5s ease-out;
}

/* Elastic bounce */
@keyframes elastic-bounce {
  0% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.elastic-bounce {
  animation: elastic-bounce 0.8s ease-in-out;
}

/* Spotlight */
@keyframes spotlight {
  0% {
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 0%);
  }
  50% {
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 50%);
  }
  100% {
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 0%);
  }
}

.spotlight {
  animation: spotlight 3s ease-in-out infinite;
}

/* Wiggle */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.wiggle {
  animation: wiggle 0.5s ease-in-out;
}

/* Heartbeat */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  56% { transform: scale(1); }
}

.heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

/* Glitch effect */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

.glitch {
  animation: glitch 0.3s ease-in-out;
}

/* Aurora wave */
@keyframes aurora-wave {
  0% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.8;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
}

.aurora-wave {
  background: linear-gradient(45deg, #667eea, #764ba2, #10B981, #3B82F6);
  background-size: 400% 400%;
  animation: aurora-wave 8s ease infinite;
}

/* Levitate */
@keyframes levitate {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.levitate {
  animation: levitate 3s ease-in-out infinite;
}

/* Particle burst */
@keyframes particle-burst {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(2) rotate(360deg);
    opacity: 0;
  }
}

.particle-burst {
  animation: particle-burst 0.8s ease-out;
}

/* Text gradient flow */
@keyframes text-gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.text-gradient-flow {
  background: linear-gradient(90deg, #667eea, #764ba2, #ec4899, #667eea);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-gradient-flow 5s ease infinite;
}

/* =====================================
 * END OF ANIMATIONS
 * ===================================== */

/* ============================================
   SCALE ANIMATIONS
   ============================================ */

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scale-bounce {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.scale-in {
  animation: scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-bounce {
  animation: scale-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

.dark .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
}

/* ============================================
   HOVER INTERACTIONS
   ============================================ */

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.25);
}

/* ============================================
   TRANSITIONS
   ============================================ */

.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spring-transition {
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   PARALLAX EFFECT
   ============================================ */

.parallax-layer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   STAGGER CHILDREN
   ============================================ */

.stagger-container > * {
  animation: slide-in-up 0.4s ease-out;
  animation-fill-mode: both;
}

.stagger-container > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-container > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-container > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-container > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-container > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-container > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-container > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-container > *:nth-child(8) { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   LOADING STATES
   ============================================ */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

@keyframes text-shimmer {
  0% {
    background-position: -500px 0;
  }
  100% {
    background-position: 500px 0;
  }
}

.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--accent-primary) 50%,
    var(--text-primary) 100%
  );
  background-size: 500px 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 3s linear infinite;
}

@keyframes gradient-text {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text {
  background: linear-gradient(
    90deg,
    #667eea,
    #764ba2,
    #667eea
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-text 3s ease infinite;
}
/**
 * Gamification Styles v2.0
 * Стили для геймификации
 */

/* ==================== OVERLAY ==================== */
.gamification-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  z-index: 100;
}

/* ==================== ACHIEVEMENT CARD ==================== */
.achievement-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.achievement-card.earned {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

.achievement-card.locked {
  opacity: 0.6;
}

.achievement-card:hover {
  transform: translateX(4px);
}

.achievement-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.achievement-icon.grayscale {
  filter: grayscale(1);
}

.achievement-info {
  flex: 1;
  min-width: 0;
}

.achievement-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.achievement-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.achievement-points {
  padding: 0.25rem 0.5rem;
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.achievement-points.earned {
  background: var(--accent-primary);
  color: white;
}

.achievement-check {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.leaderboard-row.medalist {
  background: var(--bg-tertiary);
}

.leaderboard-row:hover {
  transform: translateX(4px);
}

.leaderboard-row .rank {
  width: 2rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.leaderboard-row .user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.leaderboard-row .name {
  font-weight: 500;
}

.leaderboard-row .stats {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.leaderboard-row .stats svg {
  opacity: 0.7;
}

.leaderboard-row .points {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ==================== STAT CARD ==================== */
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
}

.stat-card .stat-icon {
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 600;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==================== LEVEL CARD ==================== */
.level-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}

.level-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: levelGlow 3s ease-in-out infinite;
}

@keyframes levelGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.level-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.level-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.level-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.points-number {
  font-size: 1.5rem;
  font-weight: 600;
}

.points-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Progress bar */
.level-progress {
  position: relative;
  z-index: 1;
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: white;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ==================== TABS ==================== */
.gamification-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
}

.gamification-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gamification-tab.active {
  border-bottom-color: var(--accent-primary);
  color: var(--accent-primary);
}

.gamification-tab:hover:not(.active) {
  color: var(--text-primary);
}

/* ==================== TIPS CARD ==================== */
.tips-card {
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tips-list {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tips-list > div {
  margin-bottom: 0.5rem;
}

.tips-footer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ==================== EMPTY STATE ==================== */
.gamification-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* ==================== CONFETTI ==================== */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent-primary);
  animation: confetti-fall 3s ease-in-out forwards;
  z-index: 1000;
}

.confetti:nth-child(odd) {
  background: #ec4899;
}

.confetti:nth-child(3n) {
  background: #22d3ee;
}

.confetti:nth-child(5n) {
  background: #10b981;
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
  .achievement-card {
    padding: 0.875rem;
  }
  
  .achievement-icon {
    font-size: 1.75rem;
  }
  
  .level-card {
    padding: 1.25rem;
  }
  
  .level-number {
    font-size: 2rem;
  }
}
/**
 * CommandCenter v7.0 - PERFORMANCE OPTIMIZED CSS
 * 
 * Принципы:
 * - GPU-ускоренные анимации (transform, opacity)
 * - CSS Custom Properties для динамических значений
 * - Минимум repaints и reflows
 * - will-change только где необходимо
 * - contain для изоляции рендеринга
 */

/* ==================== VARIABLES ==================== */
.command-center {
  --cc-spacing: 1rem;
  --cc-radius: 16px;
  --cc-radius-sm: 12px;
  --cc-transition: 0.2s ease;
  --cc-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  --cc-glow: 0 0 20px var(--glow-color, rgba(99, 102, 241, 0.3));
}

/* ==================== BASE LAYOUT ==================== */
.command-center {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  position: relative;
  overflow-x: hidden;
  padding: var(--cc-spacing);
  padding-bottom: calc(var(--cc-spacing) * 3);
  contain: layout style;
}

.cc-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==================== BACKGROUND EFFECTS ==================== */
.cc-bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: strict;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
  animation: orb-float 20s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -50px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  animation-duration: 25s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  top: 40%;
  right: -80px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  animation-duration: 30s;
  animation-delay: -5s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  bottom: 15%;
  left: 10%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(30px, -20px, 0) scale(1.05); }
  50% { transform: translate3d(-20px, 30px, 0) scale(0.95); }
  75% { transform: translate3d(20px, 20px, 0) scale(1.02); }
}

.cc-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Period-based themes */
.period-morning .orb-1 { background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%); }
.period-day .orb-1 { background: radial-gradient(circle, rgba(34, 211, 238, 0.3) 0%, transparent 70%); }
.period-evening .orb-1 { background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%); }
.period-night .orb-1 { background: radial-gradient(circle, rgba(30, 27, 75, 0.4) 0%, transparent 70%); }

/* ==================== HERO SECTION ==================== */
.hero-section {
  text-align: center;
  padding: 1.5rem 0;
  position: relative;
}

.hero-greeting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.greeting-emoji {
  font-size: 1.5rem;
  display: inline-block;
  animation: emoji-wave 3s ease-in-out infinite;
}

@keyframes emoji-wave {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(10deg) scale(1.1); }
  75% { transform: rotate(-10deg) scale(1.05); }
}

.greeting-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-name {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform var(--cc-transition);
  user-select: none;
}

.hero-name:active {
  transform: scale(0.98);
}

.sparkle-icon {
  color: #a855f7;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.8; transform: scale(1.1) rotate(10deg); }
}

.refresh-btn {
  position: absolute;
  top: 0.5rem;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--cc-transition);
}

.refresh-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.refresh-btn.refreshing svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== LIVE CLOCK ==================== */
.live-clock {
  margin-top: 1rem;
}

.clock-time {
  font-size: 2.8rem;
  font-weight: 200;
  letter-spacing: -2px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.clock-digit {
  min-width: 1.2ch;
  text-align: center;
  transition: transform 0.3s ease;
}

.clock-separator {
  margin: 0 0.1rem;
  color: var(--accent-primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.clock-seconds {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-left: 0.25rem;
  font-weight: 400;
  opacity: 0.6;
}

.clock-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-top: 0.25rem;
}

.day-progress {
  margin-top: 0.75rem;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.day-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan, #22d3ee));
  border-radius: 2px;
  transition: width 1s ease;
}

.day-progress-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* ==================== QUICK STATS ==================== */
.quick-stats {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  cursor: default;
  transition: all var(--cc-transition);
  user-select: none;
}

.stat-pill:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.stat-pill.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.stat-icon {
  font-size: 1rem;
}

.stat-value {
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

/* Skeleton */
.stat-pill.skeleton {
  min-width: 80px;
}

.skeleton-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 14px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text.small {
  height: 10px;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==================== SEARCH ==================== */
.search-section {
  position: relative;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--cc-radius);
  transition: all var(--cc-transition);
}

.search-container:focus-within,
.search-container.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color var(--cc-transition);
}

.search-container:focus-within .search-icon {
  color: var(--accent-primary);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--cc-transition);
}

.search-clear:hover {
  background: var(--accent-primary);
  color: white;
}

/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--cc-radius-sm);
  overflow: hidden;
  z-index: 100;
  box-shadow: var(--cc-shadow);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--cc-transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-tertiary);
}

.result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.result-arrow {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* ==================== BENTO GRID ==================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

.bento-card {
  perspective: 1000px;
  animation: card-appear 0.5s ease backwards;
  animation-delay: var(--delay, 0s);
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bento-large {
  grid-column: span 2;
}

.bento-card-inner {
  position: relative;
  height: 100%;
  min-height: 110px;
  padding: 1.25rem;
  border-radius: var(--cc-radius);
  color: white;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
}

.bento-large .bento-card-inner {
  min-height: 130px;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
}

.bento-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: var(--cc-glow);
}

.bento-card-inner:active {
  transform: scale(0.98);
}

.bento-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, var(--glow-color, rgba(255,255,255,0.2)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--cc-transition);
  pointer-events: none;
}

.bento-card-inner:hover .bento-glow {
  opacity: 1;
}

.bento-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bento-emoji {
  font-size: 2rem;
  position: absolute;
  opacity: 0.3;
  filter: blur(2px);
  animation: emoji-float 3s ease-in-out infinite;
}

@keyframes emoji-float {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.1) translateY(-5px); }
}

.bento-icon {
  position: relative;
  opacity: 0.9;
}

.bento-info {
  flex: 1;
  min-width: 0;
}

.bento-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
}

.bento-large .bento-title {
  font-size: 1.2rem;
}

.bento-desc {
  font-size: 0.8rem;
  opacity: 0.8;
  margin: 0;
}

.bento-arrow {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  opacity: 0.5;
  transition: transform var(--cc-transition), opacity var(--cc-transition);
}

.bento-card-inner:hover .bento-arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* Skeleton Card */
.skeleton-card {
  background: var(--bg-secondary);
  border-radius: var(--cc-radius);
  padding: 1.25rem;
  min-height: 110px;
}

.skeleton-card .skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-icon.large {
  width: 40px;
  height: 40px;
}

/* ==================== WIDGET SECTIONS ==================== */
.widget-section,
.favorites-section {
  contain: content;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.section-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-secondary);
}

.section-icon {
  color: var(--accent-primary);
}

.section-badge {
  margin-left: auto;
  padding: 0.2rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ==================== TOP REGISTRIES ==================== */
.top-registries-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.top-registry-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--cc-radius-sm);
  cursor: pointer;
  transition: all var(--cc-transition);
}

.top-registry-item:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.top-registry-rank {
  width: 28px;
  text-align: center;
  font-size: 1.1rem;
}

.rank-number {
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.top-registry-info {
  flex: 1;
  min-width: 0;
}

.top-registry-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.top-registry-icon {
  font-size: 1rem;
}

.top-registry-name {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-registry-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.top-registry-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.top-registry-count {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

/* ==================== ACTIVITY LIST ==================== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--cc-radius-sm);
  cursor: pointer;
  transition: all var(--cc-transition);
}

.activity-item:hover {
  background: var(--bg-tertiary);
}

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 0.9rem;
  line-height: 1.4;
}

.activity-user {
  font-weight: 600;
}

.activity-action {
  color: var(--text-secondary);
  margin: 0 0.25rem;
}

.activity-record {
  color: var(--accent-primary);
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.activity-registry {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Skeleton */
.skeleton-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--cc-radius-sm);
}

/* ==================== FAVORITES ==================== */
.favorites-scroll {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.favorites-scroll::-webkit-scrollbar {
  display: none;
}

.favorite-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--chip-color, var(--accent-primary));
  border-radius: var(--cc-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--cc-transition);
  flex-shrink: 0;
}

.favorite-chip:hover {
  background: var(--bg-tertiary);
  border-color: var(--chip-color, var(--accent-primary));
  transform: translateY(-2px);
}

.favorite-chip:active {
  transform: scale(0.97);
}

.chip-icon {
  font-size: 1.1rem;
}

.chip-name {
  font-weight: 500;
  font-size: 0.875rem;
}

/* ==================== REGISTRIES GRID ==================== */
.registries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.registry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--cc-radius-sm);
  cursor: pointer;
  transition: all var(--cc-transition);
  text-align: center;
}

.registry-card:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.registry-card:active {
  transform: scale(0.97);
}

.registry-card.more {
  border: 2px dashed var(--border);
  background: transparent;
}

.registry-icon {
  font-size: 1.5rem;
}

.registry-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: var(--cc-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--cc-transition);
}

.action-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
}

.action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.action-admin {
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  color: var(--text-secondary);
}

.action-admin:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.action-btn:active {
  transform: scale(0.98);
}

.action-zap {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0.5;
}

/* ==================== FOOTER ==================== */
.cc-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.footer-eagle {
  animation: eagle-bob 3s ease-in-out infinite;
}

@keyframes eagle-bob {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

.footer-version {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 400px) {
  .hero-name {
    font-size: 1.8rem;
  }
  
  .clock-time {
    font-size: 2.4rem;
  }
  
  .bento-grid {
    gap: 0.625rem;
  }
  
  .quick-stats {
    gap: 0.4rem;
  }
  
  .stat-pill {
    padding: 0.4rem 0.625rem;
    font-size: 0.8rem;
  }
  
  .registries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .orb,
  .greeting-emoji,
  .sparkle-icon,
  .bento-emoji,
  .clock-separator,
  .footer-eagle {
    animation: none;
  }
  
  .bento-card {
    animation: none;
    opacity: 1;
  }
  
  .stat-pill.pulse {
    animation: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  }
}
/* ============================================
   KADRIBOT v4.0 - DARK COSMIC THEME
   Повна переробка з нуля
   ============================================ */

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

:root {
  /* ===========================================
     НОВА ТЕМНА КОЛЬОРОВА СХЕМА
     Deep Space Theme - темні, але не чорні
     =========================================== */
  
  /* Основні фони - глибокий космічний */
  --bg-primary: #0f0f1a;
  --bg-secondary: #161625;
  --bg-tertiary: #1e1e32;
  --bg-elevated: #252540;
  --bg-glass: rgba(30, 30, 50, 0.7);
  --bg-glass-light: rgba(40, 40, 70, 0.5);
  
  /* Текст з високим контрастом */
  --text-primary: #f0f0ff;
  --text-secondary: #b8b8d0;
  --text-tertiary: #8080a0;
  --text-muted: #606080;
  
  /* Акцентні кольори - неонові */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #a855f7;
  --accent-cyan: #22d3ee;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  
  /* Градієнти */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-secondary: linear-gradient(135deg, #22d3ee, #6366f1);
  --gradient-accent: linear-gradient(135deg, #ec4899, #8b5cf6);
  --gradient-success: linear-gradient(135deg, #10b981, #22d3ee);
  --gradient-cosmic: linear-gradient(135deg, #1e1e32 0%, #0f0f1a 50%, #161625 100%);
  
  /* Glow ефекти */
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.4);
  --glow-secondary: 0 0 30px rgba(139, 92, 246, 0.3);
  --glow-cyan: 0 0 25px rgba(34, 211, 238, 0.4);
  --glow-pink: 0 0 25px rgba(236, 72, 153, 0.4);
  
  /* Статусні кольори */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #22d3ee;
  
  /* Borders */
  --border: rgba(99, 102, 241, 0.15);
  --border-glow: rgba(99, 102, 241, 0.3);
  --border-accent: rgba(139, 92, 246, 0.4);
  
  /* Shadows */
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-sm: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 4px 30px rgba(99, 102, 241, 0.2);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Typography */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Світла тема (як альтернатива) */
.light {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f1f5;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-tertiary: #8080a0;
  
  --border: rgba(99, 102, 241, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);
}

/* ===========================================
   BODY + ANIMATED BACKGROUND
   =========================================== */

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 
    'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  font-size: var(--text-base);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* РУХОМИЙ КОСМІЧНИЙ ФОН */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 70% at 50% 90%, rgba(34, 211, 238, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 80% at 10% 60%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: cosmic-flow 20s ease-in-out infinite;
}

/* Другий шар - зірки */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 200px 50px, rgba(99, 102, 241, 0.5), transparent),
    radial-gradient(1px 1px at 250px 90px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 300px 150px, rgba(139, 92, 246, 0.4), transparent);
  background-repeat: repeat;
  background-size: 350px 200px;
  pointer-events: none;
  z-index: 0;
  animation: stars-twinkle 8s ease-in-out infinite, stars-drift 60s linear infinite;
  opacity: 0.6;
}

@keyframes cosmic-flow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    filter: blur(60px);
  }
  25% {
    transform: translate(30px, -20px) scale(1.05);
    filter: blur(70px);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95);
    filter: blur(80px);
  }
  75% {
    transform: translate(-30px, -10px) scale(1.02);
    filter: blur(65px);
  }
}

@keyframes stars-twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes stars-drift {
  from { background-position: 0 0; }
  to { background-position: 350px 200px; }
}

/* ===========================================
   APP CONTAINER
   =========================================== */

.app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ===========================================
   PAGE CONTAINER - контент над фоном
   =========================================== */
.page {
  position: relative;
  z-index: 2;
  padding: 1rem;
  min-height: 100vh;
}

.page > * {
  position: relative;
  z-index: 2;
}

/* Карточки и интерактивные элементы */
.card {
  position: relative;
  z-index: 3;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* Dropdown и модальные окна */
.dropdown, .modal, [role="dialog"] {
  position: relative;
  z-index: 100;
}

/* ===========================================
   LOADING SCREEN - COSMIC
   =========================================== */

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: var(--space-xl);
  position: relative;
  z-index: 1;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-primary);
  border-right-color: var(--accent-secondary);
  border-radius: 50%;
  animation: spinner-cosmic 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  box-shadow: var(--glow-primary);
}

@keyframes spinner-cosmic {
  0% { 
    transform: rotate(0deg) scale(1);
    box-shadow: var(--glow-primary);
  }
  50% { 
    transform: rotate(180deg) scale(1.1);
    box-shadow: var(--glow-secondary);
  }
  100% { 
    transform: rotate(360deg) scale(1);
    box-shadow: var(--glow-primary);
  }
}

/* ===========================================
   ANIMATIONS - MASSIVE COLLECTION
   =========================================== */

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

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 5px var(--accent-primary), 0 0 10px rgba(99, 102, 241, 0.3);
  }
  50% { 
    box-shadow: 0 0 20px var(--accent-primary), 0 0 40px rgba(99, 102, 241, 0.5);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes border-glow {
  0%, 100% { border-color: var(--accent-primary); }
  50% { border-color: var(--accent-secondary); }
}

@keyframes text-glow {
  0%, 100% { 
    text-shadow: 0 0 10px var(--accent-primary), 0 0 20px rgba(99, 102, 241, 0.5);
  }
  50% { 
    text-shadow: 0 0 20px var(--accent-secondary), 0 0 40px rgba(139, 92, 246, 0.7);
  }
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.fade-in { animation: fadeIn 0.4s ease-out forwards; }
.fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
.fade-in-down { animation: fadeInDown 0.5s ease-out forwards; }
.fade-in-left { animation: fadeInLeft 0.5s ease-out forwards; }
.fade-in-right { animation: fadeInRight 0.5s ease-out forwards; }
.scale-in { animation: scaleIn 0.4s ease-out forwards; }
.slide-up { animation: slideUp 0.5s ease-out forwards; }
.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.float { animation: float 3s ease-in-out infinite; }
.rotate-slow { animation: rotate-slow 20s linear infinite; }
.gradient-animate { 
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite; 
}
.text-glow { animation: text-glow 2s ease-in-out infinite; }

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* ===========================================
   SKELETON LOADING - COSMIC
   =========================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-elevated) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* ===========================================
   SCROLLBAR - CUSTOM COSMIC
   =========================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
  box-shadow: var(--glow-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-secondary), var(--accent-tertiary));
}

/* ===========================================
   FORM ELEMENTS - COSMIC
   =========================================== */

input, textarea, select {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  transition: all var(--transition-base);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* ===========================================
   SAFE AREAS
   =========================================== */

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.safe-area-top {
  padding-top: env(safe-area-inset-top, 0px);
}

/* ===========================================
   SELECTION
   =========================================== */

::selection {
  background: var(--accent-primary);
  color: white;
}

/* ===========================================
   REDUCED MOTION
   =========================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================
   WOW CARDS - Уникальный дизайн карточек
   =========================================== */

/* Holographic Card */
.holo-card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 35, 0.95) 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.holo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 0%,
    rgba(99, 102, 241, 0.1) 25%,
    rgba(139, 92, 246, 0.15) 50%,
    rgba(34, 211, 238, 0.1) 75%,
    transparent 100%
  );
  background-size: 400% 400%;
  animation: holo-shift 8s ease infinite;
  pointer-events: none;
}

.holo-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee, #ec4899, #6366f1);
  background-size: 400% 100%;
  border-radius: var(--radius-xl);
  z-index: -1;
  animation: border-flow 6s linear infinite;
  opacity: 0.6;
}

@keyframes holo-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes border-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

/* Neon Glow Card */
.neon-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.neon-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.neon-card:hover::before {
  opacity: 1;
}

.neon-card:hover {
  box-shadow: 
    0 0 20px rgba(99, 102, 241, 0.3),
    0 0 40px rgba(99, 102, 241, 0.1),
    inset 0 0 20px rgba(99, 102, 241, 0.05);
}

/* Pulse Ring Effect */
.pulse-ring {
  position: relative;
}

.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent-primary);
  opacity: 0;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* Gradient Border Animation */
.gradient-border {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, #6366f1, #8b5cf6, #22d3ee, #ec4899, #6366f1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate-gradient 4s linear infinite;
}

@keyframes rotate-gradient {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Glass Morph Enhanced */
.glass-ultra {
  background: rgba(20, 20, 35, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Stat Card Modern */
.stat-card-modern {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-color, var(--accent-primary)), transparent);
}

.stat-card-modern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.stat-card-modern:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Animated Number */
.number-glow {
  text-shadow: 
    0 0 10px currentColor,
    0 0 20px currentColor,
    0 0 40px currentColor;
}

/* Icon Container with Glow */
.icon-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-glow::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(10px);
  animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.2; }
  50% { transform: scale(1.2); opacity: 0.4; }
}

/* ===========================================
   КНОПКИ НАВИГАЦИИ - ВИДИМЫЕ НА ТЕМНОМ ФОНЕ
   =========================================== */

/* Кнопка назад - базовый стиль */
button[class*="back"],
.back-button,
.btn-back,
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

button[class*="back"]:hover,
.back-button:hover,
.btn-back:hover,
.btn-icon:hover {
  background: var(--bg-tertiary) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}

button[class*="back"]:active,
.back-button:active,
.btn-back:active,
.btn-icon:active {
  transform: scale(0.95);
}

/* SVG иконки в кнопках навигации */
button[class*="back"] svg,
.back-button svg,
.btn-back svg,
.btn-icon svg {
  color: var(--text-primary) !important;
  stroke: var(--text-primary) !important;
}

/* Кнопки с ArrowLeft */
button svg[class*="arrow"],
button svg[class*="Arrow"] {
  color: var(--text-primary) !important;
}

/* Page Header кнопки */
.page-header button,
.page-header-content button {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-md);
}

.page-header button:hover,
.page-header-content button:hover {
  background: var(--bg-tertiary) !important;
  border-color: var(--accent-primary) !important;
}

.page-header button svg,
.page-header-content button svg {
  color: var(--text-primary) !important;
}

/* Прозрачные кнопки - сделать видимыми */
button[style*="background: none"],
button[style*="background:none"],
button[style*="transparent"] {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md);
  padding: 0.5rem;
}

button[style*="background: none"]:hover,
button[style*="background:none"]:hover,
button[style*="transparent"]:hover {
  background: var(--bg-tertiary) !important;
  border-color: var(--accent-primary) !important;
}

/* Lucide иконки - всегда видимые */
.lucide {
  color: currentColor;
}

/* Фикс для кнопок в хедерах страниц */
[style*="display: flex"] > button:first-child,
[style*="display:flex"] > button:first-child {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 40px;
  min-height: 40px;
}

/* Кнопка с иконкой - универсальный стиль */
.icon-button,
button:has(svg:only-child) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-button:hover,
button:has(svg:only-child):hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

/* Day Progress Bar для часов */
.day-progress {
  margin-top: 0.75rem;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.day-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 2px;
  transition: width 1s ease;
}

.day-progress-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-tertiary);
}
