/* Sidebar - Shared styles across all pages */

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 200;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: var(--bg-secondary);
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  transition: left 0.3s ease, background 0.3s ease;
  z-index: 201;
  overflow-y: auto;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.sidebar-logo img {
  height: 32px;
  width: auto;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
}

.sidebar .close-button {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar .close-button:hover {
  background: rgba(255,255,255,0.25);
}

.sidebar-nav {
  padding: 20px 0;
}

.sidebar-nav-item {
  padding: 14px 20px;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.1);
  border-left-color: var(--accent-color, #4ecdc4);
}

.sidebar-nav-item.active {
  background: rgba(255,255,255,0.15);
  border-left-color: var(--accent-color, #4ecdc4);
}

/* Sidebar Views (Mi Progreso, Premios) */
.sidebar-view {
  padding: 20px;
}

.sidebar-back-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.sidebar-back-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Progress View */
.progress-level-card {
  background: var(--card-bg, rgba(255,255,255,0.1));
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid var(--card-border, rgba(255,255,255,0.1));
}

.progress-level-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.progress-level-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-color, #4ecdc4);
}

.progress-level-name {
  font-size: 1rem;
  color: white;
  font-weight: 600;
  margin-bottom: 12px;
}

.progress-xp-bar-container {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-xp-bar-fill {
  height: 100%;
  background: var(--accent-color, #4ecdc4);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-xp-text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.progress-section-title {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.progress-project {
  background: var(--card-bg, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.progress-project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-project-name {
  font-size: 0.9rem;
  color: white;
  font-weight: 600;
}

.progress-project-count {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.progress-project-bar {
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}

.progress-project-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

/* Rewards View */
.rewards-header {
  text-align: center;
  margin-bottom: 20px;
}

.rewards-title {
  font-size: 1.2rem;
  color: white;
  font-weight: 700;
  margin-bottom: 4px;
}

.rewards-count {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.badge-item {
  background: var(--card-bg, rgba(255,255,255,0.1));
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.badge-item.earned {
  border-color: var(--accent-color, #4ecdc4);
}

.badge-item.locked {
  opacity: 0.45;
}

.badge-item-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.badge-item-name {
  font-size: 0.8rem;
  color: white;
  font-weight: 600;
  line-height: 1.3;
}

.badge-item.locked .badge-item-icon {
  filter: grayscale(1);
}
