/* AI Dashboard CSS - Bảng điều khiển AI */

/* ===== AI DASHBOARD CONTAINER ===== */
.ai-dashboard {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: -5px 0 20px rgba(0,0,0,0.3);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.ai-dashboard.show {
  right: 0;
}

/* ===== AI DASHBOARD HEADER ===== */
.ai-dashboard-header {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateZ(10px);
}

.ai-dashboard-header h3 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.ai-dashboard-header .btn-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.ai-dashboard-header .btn-close:hover {
  transform: rotate(90deg);
}

/* ===== AI DASHBOARD CONTENT ===== */
.ai-dashboard-content {
  padding: 20px;
  transform: translateZ(5px);
}

/* ===== AI SECTIONS ===== */
.ai-section {
  margin-bottom: 25px;
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.ai-section:hover {
  transform: translateZ(5px);
}

.ai-section h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-height: 30px;
}

.ai-section h4 i {
  color: #ffd700;
  margin-right: 8px;
}

.ai-section .ai-insights,
.ai-section .ai-recommendations,
.ai-section .ai-analytics,
.ai-section .ai-games,
.ai-section .ai-achievements,
.ai-section .ai-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== AI INSIGHTS ===== */
.ai-insights {
  transform-style: preserve-3d;
}

.insight-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  transform: translateZ(5px);
  transition: all 0.3s ease;
}

.insight-card:hover {
  transform: translateZ(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.insight-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: white;
}

.insight-content p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 15px;
  line-height: 1.6;
}

.insight-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== AI RECOMMENDATIONS ===== */
.ai-recommendations {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.recommendation-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  padding: 20px;
  transform: translateZ(5px);
  transition: all 0.3s ease;
}

.recommendation-card:hover {
  transform: translateZ(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.recommendation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: white;
}

.recommendation-content p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 10px;
  line-height: 1.6;
}

.recommendation-category {
  color: #ffd700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

/* ===== AI ANALYTICS ===== */
.ai-analytics {
  transform-style: preserve-3d;
}

.analytics-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  padding: 20px;
  transform: translateZ(5px);
}

.analytics-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  color: white;
}

.analytics-label {
  font-weight: 500;
}

.analytics-value {
  font-weight: 600;
  font-size: 1.1rem;
}

/* ===== AI GAMES ===== */
.ai-games {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.ai-games .btn {
  flex: 1;
  min-width: 120px;
  transform: translateZ(5px);
  transition: all 0.3s ease;
}

.ai-games .btn:hover {
  transform: translateZ(10px);
}

/* ===== AI ACHIEVEMENTS ===== */
.ai-achievements {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
}

.achievement-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transform: translateZ(5px);
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateZ(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.achievement-icon {
  font-size: 2rem;
  min-width: 50px;
  text-align: center;
}

.achievement-content {
  flex: 1;
  color: white;
}

.achievement-content h6 {
  margin: 0 0 5px 0;
  font-weight: 600;
}

.achievement-content p {
  margin: 0 0 10px 0;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

.no-achievements {
  text-align: center;
  color: rgba(255,255,255,0.7);
  padding: 40px 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

/* ===== AI PROGRESS ===== */
.ai-progress {
  transform-style: preserve-3d;
}

.progress-item {
  margin-bottom: 20px;
  transform: translateZ(5px);
}

.progress-label {
  color: white;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.progress {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  transform: translateZ(2px);
}

.progress-bar {
  background: linear-gradient(90deg, #ffd700, #ffed4e);
  border-radius: 10px;
  transition: width 0.5s ease;
  transform: translateZ(3px);
}

/* ===== LOADING ANIMATIONS ===== */
.loading-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,0.8);
  padding: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transform: translateZ(5px);
}

.loading-3d i {
  animation: spin 1s linear infinite;
}

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

/* ===== BADGES ===== */
.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-3d {
  transform: translateZ(2px);
  transition: all 0.3s ease;
}

.badge-3d:hover {
  transform: translateZ(5px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ai-dashboard {
    width: 100%;
    right: -100%;
  }
  
  .ai-dashboard.show {
    right: 0;
  }
  
  .ai-games {
    flex-direction: column;
  }
  
  .achievement-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== AI DASHBOARD TOGGLE BUTTON ===== */
.ai-dashboard-toggle {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 10000;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  transform-style: preserve-3d;
}

.ai-dashboard-toggle:hover {
  transform: translateY(-50%) translateZ(5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.ai-dashboard-toggle:active {
  transform: translateY(-50%) translateZ(2px);
}

/* ===== AI DASHBOARD OVERLAY ===== */
.ai-dashboard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ai-dashboard-overlay.show {
  opacity: 1;
  visibility: visible;
}
