/* НОВЫЙ МОБИЛЬНЫЙ ДИЗАЙН - БЕЗ ЧАТА */

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: #0f0f0f !important;
  color: #ffffff !important;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100%;
}

/* КОНТЕЙНЕР ПРИЛОЖЕНИЯ */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f0f0f !important;
}

/* ИНТЕРЕСНАЯ ШАПКА */
.app-header {
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f) !important;
  border-bottom: 2px solid #2a2a2a;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d4aa, transparent);
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4aa, #00b894, #00d4aa);
  opacity: 0.6;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.level-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid #00d4aa;
  box-shadow: 0 2px 8px rgba(0, 212, 170, 0.2);
  position: relative;
}

.level-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d4aa, transparent);
}

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

.level-name {
  font-weight: 600;
  font-size: 0.8rem;
}

.score-info {
  font-weight: 700;
  color: #00d4aa;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.score-info.animate {
  animation: scoreGain 0.8s ease-out;
}

/* МИНИ-ДОСТИЖЕНИЯ В ШАПКЕ */
.achievements-mini {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.achievement-mini {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 1px solid #3a3a3a;
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  transition: all 0.2s;
  position: relative;
}

.achievement-mini.earned {
  background: linear-gradient(135deg, #00d4aa, #00b894);
  border-color: #00d4aa;
  box-shadow: 0 0 12px rgba(0, 212, 170, 0.4);
  color: #000;
  font-weight: 700;
}

.achievement-mini.earned::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, #00d4aa, #00b894, #00d4aa);
  border-radius: 3px;
  z-index: -1;
  opacity: 0.3;
}

.achievement-mini.earned:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 0 16px rgba(0, 212, 170, 0.6);
}

.achievement-mini.new-earned {
  animation: achievementPulse 2s ease-out;
}

/* ПЛАВАЮЩИЕ ОЧКИ */
.floating-score {
  position: absolute;
  font-weight: 700;
  font-size: 1.2rem;
  color: #00d4aa;
  text-shadow: 0 0 10px #00d4aa;
  pointer-events: none;
  z-index: 1000;
  animation: scoreFloat 2s ease-out forwards;
}

/* АНИМАЦИЯ СООБЩЕНИЙ С ОЧКАМИ - НЕЖНАЯ */
.message--score-gain {
  background: rgba(0, 212, 170, 0.15) !important;
  color: #00d4aa !important;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(0, 212, 170, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
  animation: gentleScoreGain 1s ease-out;
}

@keyframes gentleScoreGain {
  0% { 
    transform: scale(0.9);
    opacity: 0;
    box-shadow: 0 0 0 rgba(0, 212, 170, 0);
  }
  50% { 
    transform: scale(1.02);
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.4);
  }
  100% { 
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
  }
}

/* ПРОГРЕСС-БАР */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #2a2a2a;
  border-radius: 1px;
  overflow: hidden;
  position: relative;
  border: 1px solid #3a3a3a;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4aa, #00b894, #00d4aa);
  transition: width 0.8s ease;
  position: relative;
}

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

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-fill.animate {
  animation: progressGlow 1s ease-out;
}

/* ОСНОВНОЙ КОНТЕНТ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px); /* Уменьшил с 100px до 70px */
  overflow: hidden;
}

/* ОБЛАСТЬ СООБЩЕНИЙ */
.messages-container {
  flex: 1;
  padding: 1rem;
  padding-bottom: 140px; /* Отступ для фиксированных кнопок */
  overflow-y: auto;
  overflow-x: hidden;
}

.message {
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease-out;
  transition: all 0.3s ease-out;
}

.message.fade-out {
  opacity: 0;
  transform: translateX(-100%);
}

.message.fade-up {
  opacity: 0;
  transform: translateY(-30px) scale(0.9);
  transition: all 0.4s ease-out;
}

.message--bot {
  display: flex;
  justify-content: flex-start;
}

.message--user {
  display: flex;
  justify-content: flex-end;
}

.message-text {
  background: #2a2a2a;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.4;
}

.message--bot .message-text {
  background: #2a2a2a;
  border-bottom-left-radius: 4px;
}

.message--user .message-text {
  background: #00d4aa;
  color: #000;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.25rem;
  text-align: right;
}

/* ИНДИКАТОР ПЕЧАТИ */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.typing-dots {
  display: flex;
  gap: 0.2rem;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #666;
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ОБЛАСТЬ ДЕЙСТВИЙ - ЗАФИКСИРОВАНА ВНИЗУ */
.actions-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .quick-actions {
    grid-template-columns: 1fr 1fr; /* 2 колонки на мобильном */
    gap: 0.5rem;
  }
}

.quick-action-btn {
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  color: #ffffff;
  border: 1px solid #3a3a3a;
  padding: 1rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.quick-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.quick-action-btn:hover {
  background: #3a3a3a;
  border-color: #00d4aa;
  transform: translateY(-1px);
}

.quick-action-btn:active {
  transform: translateY(0);
}

/* КНОПКИ ПО ТИПАМ */
.quick-action-btn[data-action*="theory"] {
  border-left: 4px solid #4f46e5;
}

.quick-action-btn[data-action*="practice"] {
  border-left: 4px solid #f59e0b;
}

.quick-action-btn[data-action*="strategy"] {
  border-left: 4px solid #8b5cf6;
}

.quick-action-btn[data-action*="management"] {
  border-left: 4px solid #ef4444;
}

.quick-action-btn[data-action*="mentoring"] {
  border-left: 4px solid #10b981;
}

/* КНОПКИ ОТВЕТОВ - ПРОСТЫЕ И КРАСИВЫЕ */
.answer-btn {
  background: #2a2a2a !important;
  border: 2px solid #4a4a4a !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}

.answer-btn:hover {
  background: #3a3a3a !important;
  border-color: #00d4aa !important;
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.3) !important;
  transform: translateY(-2px) !important;
}

/* МОДАЛЬНЫЕ ОКНА */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 2rem;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  border: 1px solid #2a2a2a;
}

/* УВЕДОМЛЕНИЕ О ДОСТИЖЕНИИ */
.achievement-notification {
  text-align: center;
}

.achievement-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.achievement-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d4aa;
  margin-bottom: 0.5rem;
}

.achievement-description {
  color: #ccc;
  margin-bottom: 1rem;
}

.achievement-points {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 2rem;
}

/* ДЕТАЛЬНАЯ СТАТИСТИКА */
.stats-detail h3 {
  text-align: center;
  margin-bottom: 2rem;
  color: #00d4aa;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #2a2a2a;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #3a3a3a;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d4aa;
}

.stat-label {
  font-size: 0.8rem;
  color: #ccc;
  margin-top: 0.25rem;
}

/* ПОЛНЫЙ СПИСОК ДОСТИЖЕНИЙ */
.achievements-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.achievement-full {
  background: #2a2a2a;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #3a3a3a;
  transition: all 0.2s;
}

.achievement-full.earned {
  background: #00d4aa;
  color: #000;
  border-color: #00d4aa;
  box-shadow: 0 0 12px rgba(0, 212, 170, 0.3);
}

.achievement-full-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.achievement-full-name {
  font-size: 0.8rem;
  font-weight: 600;
}

/* КНОПКИ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: #00d4aa;
  color: #000;
}

.btn--primary:hover {
  background: #00b894;
  transform: translateY(-1px);
}

.btn--secondary {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #3a3a3a;
}

.btn--secondary:hover {
  background: #3a3a3a;
}

/* АНИМАЦИИ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scoreGain {
  0% { 
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  50% { 
    transform: scale(1.3) translateY(-10px);
    opacity: 1;
    color: #00d4aa;
    text-shadow: 0 0 20px #00d4aa;
  }
  100% { 
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes scoreFloat {
  0% { 
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% { 
    transform: translateY(-30px) scale(1.2);
    opacity: 0.8;
  }
  100% { 
    transform: translateY(-60px) scale(0.8);
    opacity: 0;
  }
}

@keyframes progressGlow {
  0% { 
    box-shadow: 0 0 5px rgba(0, 212, 170, 0.3);
  }
  50% { 
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.8), 0 0 30px rgba(0, 212, 170, 0.4);
  }
  100% { 
    box-shadow: 0 0 5px rgba(0, 212, 170, 0.3);
  }
}

@keyframes achievementPulse {
  0% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.7);
  }
  70% { 
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 212, 170, 0);
  }
  100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 212, 170, 0);
  }
}

@keyframes levelUpGlow {
  0% { 
    background: #2a2a2a;
    transform: scale(1);
  }
  50% { 
    background: #00d4aa;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 212, 170, 0.8);
  }
  100% { 
    background: #2a2a2a;
    color: #fff;
    transform: scale(1);
  }
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
  .app-header {
    padding: 0.4rem 0.75rem;
  }
  
  .header-top {
    margin-bottom: 0.2rem;
  }
  
  .user-info {
    gap: 0.5rem;
  }
  
  .level-badge {
    padding: 0.25rem 0.5rem;
  }
  
  .level-name {
    font-size: 0.75rem;
  }
  
  .level-icon {
    font-size: 0.9rem;
  }
  
  .score-info {
    font-size: 0.9rem;
  }
  
  .achievements-mini {
    gap: 0.15rem;
  }
  
  .achievement-mini {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
    border-radius: 2px;
  }
  
  .messages-container {
    padding: 0.75rem;
  }
  
  .actions-area {
    padding: 0.75rem;
  }
  
  .quick-actions {
    gap: 0.5rem;
  }
  
  .quick-action-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    text-align: center;
  }
  
  .answer-btn {
    padding: 0.875rem 0.5rem !important;
    font-size: 0.95rem !important;
  }
}

/* СКРЫТЬ ЭЛЕМЕНТЫ КОТОРЫЕ НЕ НУЖНЫ */
.sidebar,
.stats-toggle,
.message-input-container,
.send-btn {
  display: none !important;
}