/* === ACHIEVEMENT NOTIFICATION === */
.mb-achievement-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4a 100%);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 165, 116, 0.3);
  z-index: 10000;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 380px;
}

.mb-achievement-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.mb-achievement-notification__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #7BBDF7 0%, #A8D4FF 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: achievementPulse 2s ease-in-out infinite;
}

.mb-achievement-notification__icon ion-icon {
  font-size: 28px;
  color: #1a1a2e;
}

.mb-achievement-notification__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mb-achievement-notification__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7BBDF7;
}

.mb-achievement-notification__name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.mb-achievement-notification__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* === ACHIEVEMENT ANIMATION === */
@keyframes achievementPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(212, 165, 116, 0.2); }
}

/* === CALENDAR HEATMAP === */
.mb-heatmap {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.mb-heatmap__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mb-heatmap__title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mb-heatmap__title ion-icon {
  color: #7BBDF7;
}

.mb-heatmap__stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #6b6b8a;
}

.mb-heatmap__stats strong {
  color: #1a1a2e;
  font-weight: 600;
}

.mb-heatmap__grid {
  display: grid;
  grid-template-columns: repeat(53, 1fr);
  gap: 3px;
}

.mb-heatmap__day {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #f0f0f5;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mb-heatmap__day:hover {
  transform: scale(1.5);
  z-index: 10;
}

.mb-heatmap__day[data-level="1"] { background: #D6EBFF; }
.mb-heatmap__day[data-level="2"] { background: #d4c4b0; }
.mb-heatmap__day[data-level="3"] { background: #c9ad8c; }
.mb-heatmap__day[data-level="4"] { background: #7BBDF7; }

.mb-heatmap__legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 12px;
  font-size: 11px;
  color: #6b6b8a;
}

.mb-heatmap__legend-item {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* === ACTIVITY TIMELINE === */
.mb-timeline {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.mb-timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mb-timeline__title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mb-timeline__title ion-icon {
  color: #7BBDF7;
}

.mb-timeline__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.mb-timeline__list::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #7BBDF7, #f0f0f5);
}

.mb-timeline__item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  position: relative;
  animation: fadeSlideIn 0.4s ease-out forwards;
  opacity: 0;
}

.mb-timeline__item:nth-child(1) { animation-delay: 0.1s; }
.mb-timeline__item:nth-child(2) { animation-delay: 0.15s; }
.mb-timeline__item:nth-child(3) { animation-delay: 0.2s; }
.mb-timeline__item:nth-child(4) { animation-delay: 0.25s; }
.mb-timeline__item:nth-child(5) { animation-delay: 0.3s; }

/* === TIMELINE ANIMATION === */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.mb-timeline__icon {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 2px solid #7BBDF7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.mb-timeline__icon ion-icon {
  font-size: 18px;
  color: #7BBDF7;
}

.mb-timeline__content {
  flex: 1;
  padding-top: 8px;
}

.mb-timeline__action {
  font-size: 14px;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.mb-timeline__action strong {
  font-weight: 600;
}

.mb-timeline__time {
  font-size: 12px;
  color: #6b6b8a;
}

/* === STATS CHARTS === */
.mb-stats-chart {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.mb-stats-chart__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mb-stats-chart__title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.mb-stats-chart__period {
  display: flex;
  gap: 8px;
}

.mb-stats-chart__period button {
  padding: 6px 12px;
  border: none;
  background: #f0f0f5;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #6b6b8a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mb-stats-chart__period button.active,
.mb-stats-chart__period button:hover {
  background: #7BBDF7;
  color: #fff;
}

.mb-stats-chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding-top: 20px;
}

.mb-stats-chart__bar {
  flex: 1;
  background: linear-gradient(to top, #7BBDF7, #D6EBFF);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: all 0.3s ease;
  position: relative;
}

.mb-stats-chart__bar:hover {
  background: linear-gradient(to top, #4893D4, #7BBDF7);
}

.mb-stats-chart__bar::after {
  content: attr(data-value);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: #1a1a2e;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mb-stats-chart__bar:hover::after {
  opacity: 1;
}

.mb-stats-chart__labels {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.mb-stats-chart__labels span {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: #6b6b8a;
}

/* === PROGRESS RINGS === */
.mb-progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mb-progress-ring svg {
  transform: rotate(-90deg);
}

.mb-progress-ring__track {
  fill: none;
  stroke: #f0f0f5;
}

.mb-progress-ring__progress {
  fill: none;
  stroke: #7BBDF7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.mb-progress-ring__value {
  position: absolute;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
}

/* === ACHIEVEMENT BADGES === */
.mb-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.mb-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 160px;
}

.mb-badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mb-badge--locked {
  opacity: 0.5;
  filter: grayscale(1);
}

.mb-badge--locked:hover {
  opacity: 0.7;
  filter: grayscale(0.5);
}

.mb-badge__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #7BBDF7 0%, #A8D4FF 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.mb-badge--locked .mb-badge__icon {
  background: #e0e0e5;
}

.mb-badge__icon ion-icon {
  font-size: 24px;
  color: #1a1a2e;
}

.mb-badge--locked .mb-badge__icon ion-icon {
  color: #999;
}

.mb-badge__name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.mb-badge__desc {
  font-size: 11px;
  color: #6b6b8a;
  line-height: 1.4;
}

.mb-badge__date {
  font-size: 10px;
  color: #7BBDF7;
  margin-top: 8px;
}

/* === SKELETON LOADING === */
.mb-skeleton {
  background: linear-gradient(90deg, #f0f0f5 25%, #e8e8ed 50%, #f0f0f5 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}

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

.mb-skeleton--circle { border-radius: 50%; }
.mb-skeleton--text { height: 14px; margin-bottom: 8px; }
.mb-skeleton--title { height: 24px; width: 60%; margin-bottom: 12px; }
.mb-skeleton--stat { height: 40px; }

/* === EMPTY STATES === */
.mb-empty-state {
  text-align: center;
  padding: 40px 20px;
}

.mb-empty-state__icon {
  font-size: 64px;
  color: #7BBDF7;
  margin-bottom: 16px;
  opacity: 0.6;
}

.mb-empty-state__title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.mb-empty-state__desc {
  font-size: 14px;
  color: #6b6b8a;
  margin-bottom: 20px;
}

.mb-empty-state__action {
  display: inline-block;
  padding: 12px 24px;
  background: #7BBDF7;
  color: #fff;
  font-weight: 600;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mb-empty-state__action:hover {
  background: #4893D4;
  transform: translateY(-2px);
}

/* === READING STATS === */
.mb-reading-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mb-reading-stat {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.mb-reading-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.mb-reading-stat__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #EFF5FC 0%, #f0ebe4 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.mb-reading-stat__icon ion-icon {
  font-size: 24px;
  color: #7BBDF7;
}

.mb-reading-stat__value {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.mb-reading-stat__label {
  font-size: 12px;
  color: #6b6b8a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .mb-achievement-notification {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
  
  .mb-heatmap__grid {
    grid-template-columns: repeat(26, 1fr);
  }
  
  .mb-reading-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mb-badges {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === DARK MODE === */
[data-theme="dark"] .mb-achievement-notification {
  background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%);
}

[data-theme="dark"] .mb-heatmap,
[data-theme="dark"] .mb-timeline,
[data-theme="dark"] .mb-stats-chart,
[data-theme="dark"] .mb-badge,
[data-theme="dark"] .mb-reading-stat {
  background: #242440;
}

[data-theme="dark"] .mb-heatmap__title,
[data-theme="dark"] .mb-timeline__title,
[data-theme="dark"] .mb-stats-chart__title,
[data-theme="dark"] .mb-badge__name,
[data-theme="dark"] .mb-reading-stat__value,
[data-theme="dark"] .mb-timeline__action,
[data-theme="dark"] .mb-empty-state__title {
  color: #f1f1f1;
}

[data-theme="dark"] .mb-heatmap__stats,
[data-theme="dark"] .mb-timeline__time,
[data-theme="dark"] .mb-stats-chart__labels span,
[data-theme="dark"] .mb-badge__desc,
[data-theme="dark"] .mb-reading-stat__label,
[data-theme="dark"] .mb-empty-state__desc {
  color: #a0a0b0;
}

[data-theme="dark"] .mb-heatmap__day {
  background: #3a3a50;
}

[data-theme="dark"] .mb-timeline__list::before {
  background: linear-gradient(to bottom, #7BBDF7, #3a3a50);
}

[data-theme="dark"] .mb-timeline__icon {
  background: #242440;
}

[data-theme="dark"] .mb-stats-chart__period button {
  background: #3a3a50;
  color: #a0a0b0;
}

[data-theme="dark"] .mb-progress-ring__track {
  stroke: #3a3a50;
}

[data-theme="dark"] .mb-progress-ring__value {
  color: #f1f1f1;
}

[data-theme="dark"] .mb-skeleton {
  background: linear-gradient(90deg, #3a3a50 25%, #4a4a60 50%, #3a3a50 75%);
  background-size: 200% 100%;
}

[data-theme="dark"] .mb-reading-stat__icon {
  background: linear-gradient(135deg, #3a3a50 0%, #2a2a40 100%);
}
