@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@500;700&family=Fira+Code:wght@400;600&display=swap');

:root {
  --bg-pastel-pink: #ffeef2;
  --card-white: #ffffff;
  --main-pink: #ff8fa3;
  --border-pink: #ffb7c5;
  --text-dark: #4a354f;
  --notebook-bg: #fffbfb;
  --highlight-box: #fff0f3;
}

.pagee {
  width: 92%;
  max-width: 1200px;
  place-items: center;
}

.workspace-card {
  background-color: var(--card-white);
  border: 3px solid var(--border-pink);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(222, 165, 175, 0.25);
  font-family: 'Comfortaa', sans-serif;
  color: var(--text-dark);
  max-width: 580px;
  width: 90%;
  padding: 24px;
  box-sizing: border-box;
}

.workspace-header {
  border-bottom: 2px solid var(--bg-pastel-pink);
  padding-bottom: 12px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--main-pink);
}

.header-level {
  font-size: 11px;
  background-color: var(--bg-pastel-pink);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
}

/* --- NUEVO: CONTENEDOR DE PESTAÑAS (TABS) --- */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.tab-btn {
  flex: 1;
  background-color: var(--notebook-bg);
  border: 2px solid var(--bg-pastel-pink);
  border-bottom: none; /* Da efecto de pestaña conectada hacia abajo */
  border-radius: 10px 10px 0 0;
  padding: 8px 5px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #a48fa6;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--main-pink);
  background-color: #fff5f7;
}

/* Pestaña seleccionada actualmente */
.tab-btn.active {
  background-color: var(--card-white);
  border-color: var(--border-pink);
  color: var(--main-pink);
  position: relative;
  z-index: 2;
  box-shadow: 0 -2px 5px rgba(222, 165, 175, 0.1);
}

.stats-panel {
  margin-bottom: 20px;
}

.stat-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.progress-bar-track {
  background: var(--bg-pastel-pink);
  width: 180px;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.lessons-bg {
  background: linear-gradient(90deg, var(--main-pink), #ffb3c1);
}

.notebook-board {
  background-color: var(--notebook-bg);
  border: 1px solid rgba(255, 143, 163, 0.15);
  border-radius: 14px;
  padding: 20px;
  height: 240px;
  overflow-y: auto;
  margin-bottom: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dark);
}

.code-example-box {
  background-color: var(--highlight-box);
  border-left: 3px solid var(--main-pink);
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 4px;
  color: #b85b6c;
  font-weight: 600;
}

.notebook-board::-webkit-scrollbar { width: 6px; }
.notebook-board::-webkit-scrollbar-track { background: transparent; }
.notebook-board::-webkit-scrollbar-thumb { background: var(--border-pink); border-radius: 10px; }

.input-container {
  display: flex;
  align-items: center;
  background-color: var(--notebook-bg);
  border: 2px solid var(--bg-pastel-pink);
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color 0.3s;
}

.input-container:focus-within {
  border-color: var(--main-pink);
}

.code-prefix {
  color: var(--main-pink);
  margin-right: 10px;
  font-family: 'Fira Code', monospace;
  font-weight: 600;
}

.code-input-field {
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  font-size: 14px;
  width: 100%;
  outline: none;
}

.code-input-field::placeholder {
  color: #cbb4cc;
  font-weight: 400;
}

.workspace-footer {
  margin-top: 15px;
  font-size: 11px;
  text-align: center;
  color: #a48fa6;
}

.cmd-tag {
  background-color: var(--bg-pastel-pink);
  color: var(--text-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-weight: 600;
}