@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto:wght@500&family=Rubik:wght@400;500;600;700&display=swap');

:root {
  --primary: #1E40AF;
  --accent: #06B6D4;
  --accent-dark: #0E7490;
  --highlight: #A78BFA;
  --yellow: #FBBF24;
  --orange: #F472B6;
  --text: #1E293B;
  --bg: #F8FAFC;
  --card-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --progress-bg: #E2E8F0;
  --progress-accent: #06B6D4;
  --glass-bg: rgba(255, 255, 255, 0.12);
  --holo-glow: #E0F7FA;
  --neon-accent: #34D399;
  --selected-blue: #3B82F6;
  --correct-green: #10B981;
  --incorrect-red: #EF4444;
  --button-border: #D1D5DB;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #F8FAFC, #E0F7FA);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  overflow-y: scroll;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%2306B6D4" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30v4h4v2h-4v4h-2v-4h-4v-2h4v-4h2zM6 34v4h4v2H6v4H4v-4H0v-2h4v-4h2zm0-30v4H4v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  z-index: -1;
}

header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 0 0 var(--radius) var(--radius);
}



  .hamburger-top {
    display: none;

  }

.logo {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 70%;
}

nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

nav a.active {
  background: var(--primary);
  color: white;
}

.login-link {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  font-size: 1rem;
  font-family: 'Rubik', sans-serif;
  text-decoration: none;
}

.login-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.2);
}

.left-sidebar {
  width: 280px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  position: fixed;
  top: 100px;
  left: max(1rem, calc((100% - 1280px) / 2));
  height: calc(100% - 120px);
  padding-top: 1.5rem;
  padding-right: 0.5rem;
  padding-bottom: 1.5rem;
  padding-left: 1.5rem; /* tu osobny padding z lewej */
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 998;
  transition: all 0.3s ease;
  border: 1px solid rgba(52, 211, 153, 0.2);
}


.left-sidebar:hover {
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.3);
}

.left-sidebar h3 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;

  top: 0;
  background: var(--glass-bg);
  z-index: 999;
  padding: 0.5rem 0;
  text-shadow: 0 0 5px var(--holo-glow);
}

.left-sidebar h3::before {
  content: '\f19d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--neon-accent);
  font-size: 1.1rem;
}

.task-list-container {
  height: calc(100% - 3rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.task-list {
  list-style: none;
  padding: 0;
}

.task-list li.chapter {
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: var(--card-bg);
  transition: all 0.3s ease;
}

.task-list li.chapter a {
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.task-list li.chapter a::before {
  content: '\f02d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--neon-accent);
  font-size: 0.95rem;
  margin-right: 0.75rem;
}

.task-list li.chapter a::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--neon-accent);
  transition: transform 0.3s ease;
}

.task-list li.chapter.collapsed a::after {
  transform: rotate(-90deg);
}

.task-list li.chapter a:hover {
  background: linear-gradient(135deg, var(--accent), var(--neon-accent));
  color: white;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.task-list ul.sub-tasks {
  padding-left: 1.5rem;
  display: none;
  animation: slideDown 0.4s ease forwards;
}

.task-list li.chapter.expanded ul.sub-tasks {
  display: block;
}

.task-list li:not(.chapter) a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  background: var(--card-bg);
  position: relative;
}

.task-list li:not(.chapter) a::before {
  content: '\f15c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 0.75rem;
  color: var(--neon-accent);
  font-size: 0.9rem;
}

.task-list li:not(.chapter) a::after {
  content: '\f070';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--neon-accent);
  margin-left: auto;
  transition: all 0.3s ease;
}

.task-list li:not(.chapter) a.viewed::after {
  content: '\f06e';
  color: var(--selected-blue);
}

.task-list li:not(.chapter) a.solved::after {
  content: '\f058';
  color: #16A34A;
}

.task-list li:not(.chapter) a:hover {
  background: linear-gradient(135deg, var(--accent), var(--neon-accent));
  color: white;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.task-list li:not(.chapter) a.active {
  background: linear-gradient(135deg, var(--primary), var(--highlight));
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.task-list-container::-webkit-scrollbar {
  width: 6px;
}

.task-list-container::-webkit-scrollbar-track {
  background: var(--progress-bg);
  border-radius: 10px;
}

.task-list-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.task-list-container::-webkit-scrollbar-thumb:hover {
  background: var(--neon-accent);
}

.right-sidebar {
  width: 280px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 100px;
  right: max(1rem, calc((100% - 1280px) / 2));
  height: calc(100% - 120px);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  z-index: 998;
  transition: all 0.3s ease;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.right-sidebar:hover {
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.3);
}

.right-sidebar::-webkit-scrollbar {
  width: 6px;
}

.right-sidebar::-webkit-scrollbar-track {
  background: var(--progress-bg);
  border-radius: 10px;
}

.right-sidebar::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.right-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--neon-accent);
}

.progress-box {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(45deg, var(--neon-accent), var(--accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.progress-box h4 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.125rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 5px var(--holo-glow);
}

.progress-box .progress-circle {
  width: 100%;
  height: 8px;
  background: var(--progress-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin: 0 auto 0.5rem; /* Dodajemy margines dolny, aby oddzielić od tekstu */
}

.progress-box .progress-circle .progress {
  width: 0%; /* Ustaw dynamicznie w JS lub inline */
  height: 100%;
  background: var(--neon-accent);
  border-radius: 4px;
  transition: width 1s ease; /* Animacja zmiany szerokości */
}

.progress-box .progress-text {
  position: static; /* Usuwamy pozycjonowanie absolutne */
  text-align: center; /* Wyśrodkowanie tekstu */
  font-size: 1rem;
  font-weight: 600;
  color: var(--neon-accent);
  margin-top: 0.5rem; /* Odstęp od paska */
}








.level-info {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(45deg, var(--neon-accent), var(--accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.level-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--holo-glow), transparent);
  opacity: 0.3;
  z-index: 0;
}

.level-info h4 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 0 5px var(--holo-glow);
}

.level-info h4::before {
  content: '\f005';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--neon-accent);
  font-size: 1.1rem;
}

.level-info .selection-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.level-info .selection-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: var(--card-bg);
  transition: all 0.3s ease;
}

.level-info .selection-item:hover {
  background: linear-gradient(135deg, var(--holo-glow), var(--card-bg));
  transform: translateX(4px);
}

.level-info .selection-item i {
  color: var(--neon-accent);
  font-size: 1rem;
}

.change-selection {
  display: block;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, var(--accent), var(--highlight));
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  width: fit-content;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
  transition: all 0.3s ease;
}

.change-selection:hover {
  background: linear-gradient(45deg, var(--accent-dark), var(--neon-accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.4);
}

main {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 0 1rem;
  z-index: 2;
  position: relative;
}

.task, .info {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(45deg, var(--neon-accent), var(--accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: all 0.3s ease;
  animation: slideIn2 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.task:hover, .info:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.3);
}

main .task:hover, main .info:hover {
  transform: none;
}

.task h3, .info h3 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
  font-weight: 600;
  text-shadow: 0 0 5px var(--holo-glow);
}

.task h3::before, .info h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--neon-accent);
  border-radius: 2px;
}

.task p.question, .info p.content {
  font-size: 1rem;
  line-height: 1.6;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 2px solid var(--neon-accent);
  font-weight: 400;
  text-align: justify;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.answer-button {
  background: var(--card-bg);
  border: 1px solid var(--button-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
  min-height: 48px;
  display: flex;
  align-items: center;
  white-space: normal;
  word-wrap: break-word;
  will-change: transform;
}

.answer-button .option-letter {
  font-weight: 700;
  margin-right: 0.25rem;
  color: #000000;
}

.answer-button .option-value {
  font-weight: 400;
}

.answer-button:hover {
  background: linear-gradient(135deg, var(--holo-glow), var(--card-bg));
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(52, 211, 153, 0.2);
  border-color: var(--neon-accent);
}

.answer-button:hover .option-letter {
  color: #000000;
}

.answer-button.selected {
  background: linear-gradient(135deg, var(--selected-blue), var(--accent));
  border-color: var(--neon-accent);
  color: #000000;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
  transform: scale(1.01);
}

.answer-button.selected .option-letter {
  color: #000000;
}

.answer-button.selected .option-value {
  color: #000000;
}

.answer-button.correct {
  background: linear-gradient(135deg, var(--correct-green), var(--neon-accent));
  border-color: var(--neon-accent);
  color: white;
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
  animation: pulse 0.4s ease-out forwards;
}

.answer-button.correct .option-letter {
  color: #000000;
}

.answer-button.incorrect {
  background: var(--incorrect-red);
  border-color: var(--neon-accent);
  color: white;
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
  animation: shake 0.3s ease;
}

.answer-button.incorrect .option-letter {
  color: #000000;
}

.task input[type="text"] {
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  width: 100%;
  max-width: 240px;
  margin: 0 auto 1rem;
  display: block;
  background: white;
  transition: all 0.3s ease;
}

.task input[type="text"]:focus {
  border-color: var(--neon-accent);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
  outline: none;
}

.task .button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.task button.check-answer,
.task button.show-answer,
.task button.ask-question,
.task button.check-subtask {
  background: linear-gradient(45deg, var(--accent), var(--highlight));
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-family: 'Rubik', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
  transition: all 0.3s ease;
  z-index: 1;
}

.task button.check-answer:hover,
.task button.show-answer:hover,
.task button.ask-question:hover,
.task button.check-subtask:hover {
  background naquela-gradient(45deg, var(--accent-dark), var(--neon-accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.4);
}

.task button.check-answer:active,
.task button.show-answer:active,
.task button.ask-question:active,
.task button.check-subtask:active {
  transform: scale(0.98);
}

.solution {
  display: none;
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border-radius: 14px;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(45deg, var(--neon-accent), var(--accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.2);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  position: relative;
}

.solution.show {
  display: block;
  animation: slideIn 0.5s ease;
}

.solution p {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1rem;
}

.solution p:not(.no-check)::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--neon-accent);
  font-weight: bold;
  font-size: 1.1rem;
  opacity: 0;
  animation: fadeInCheck 0.5s ease forwards;
  animation-delay: 0.2s;
}

.solution strong {
  font-family: 'Rubik', sans-serif;
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.result {
  margin-top: 1rem;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
}

.result.correct {
  color: var(--correct-green);
}

.result.incorrect {
  color: var(--incorrect-red);
}

.subtask-container {
  margin-bottom: 1rem;
}

.subtask-container p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.subtask-input-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.subtask-container input[type="text"] {
  width: 100%;
  max-width: 200px;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: white;
  transition: all 0.3s ease;
}

.subtask-container input[type="text"]:focus {
  border-color: var(--neon-accent);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
  outline: none;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #6B7280;
  font-size: 0.875rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

footer .social-links a {
  color: var(--accent);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

footer .social-links a:hover {
  color: var(--neon-accent);
  transform: scale(1.2);
}


.sidebar-toggle {
  display: none; /* Ukryty na dużych ekranach */
  position: fixed;
  left: 1rem; /* Odstęp od lewej krawędzi */
  top: 50%; /* Pozycja w pionowym środku */
  transform: translateY(-50%); /* Wyśrodkowanie w pionie */
  background: var(--neon-accent);
  color: white;
  border: none;
  border-radius: 50%; /* Okrągły przycisk */
  width: 48px; /* Rozmiar przycisku */
  height: 48px;
  font-size: 1.4rem; /* Rozmiar ikony */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1001; /* Wyżej niż inne elementy */
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1); /* Skalowanie przy hover */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle[aria-expanded="true"] i {
  content: '\f00d'; /* Ikona "X" gdy sidebar jest otwarty */
}


@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn2 {
  from { opacity: 1; transform: translateY(-1px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes confetti {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  50% { transform: translate(-150%, -100%) scale(1); opacity: 1; }
  100% { transform: translate(-200%, -200%) scale(0); opacity: 0; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

@keyframes fadeInCheck {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}




body.sidebar-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Półprzezroczyste tło */
  z-index: 997; /* Pod sidebar, nad resztą */
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

body.sidebar-open .left-sidebar.open + ::after {
  opacity: 1;
  pointer-events: auto;
}


  .sidebar-toggle {
    display: none;

  }


@media (max-width: 1280px) {

/* --- Główne ustawienia i odstępy --- */
  body {
    /* Zapewniamy odstęp dla stałego nagłówka */
    padding-top: 50px; 
  }

  main {
    margin: 1.5rem auto;
    /* Zmniejszony padding boczny zgodnie z Twoją sugestią */
    padding: 0 0.75rem; 
  }

  /* --- Przycisk do otwierania bocznego menu --- */
  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    background: var(--neon-accent);
    color: white;
    border: none;
    border-radius: 50%;
    /* Przywrócono mniejszy rozmiar przycisku */
    width: 45px; 
    height: 45px;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: all 0.3s ease;
  }

  /* --- Lewy sidebar (menu z zadaniami) --- */
  .left-sidebar {
    width: 80%;
    /* Przywrócono oryginalną maksymalną szerokość */
    max-width: 280px; 
    top: 0;
    height: 100%;
    left: 0;
    transform: translateX(-100%);
    /* Nieco zmniejszony padding */
    padding: 0.75rem; 
    border-radius: 0 8px 8px 0;
    z-index: 1002;
  }

  .left-sidebar.open {
    transform: translateX(0);
  }

  .left-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  /* Przywrócono oryginalne, mniejsze rozmiary czcionek w liście zadań */
  .task-list li.chapter a {
    font-size: 1rem;
    padding: 1rem 1rem;
  }

  .task-list li:not(.chapter) a {
    font-size: 0.85rem;
    padding: 0.8rem 0.75rem;
  }

  .task-list li.chapter a::before,
  .task-list li:not(.chapter) a::before {
    font-size: 0.8rem;
    margin-right: 0.5rem;
  }

  .task-list li.chapter a::after,
  .task-list li:not(.chapter) a::after {
    font-size: 0.7rem;
  }

  .task-list-container {
    padding-right: 0.5rem;
  }

  /* --- Prawy sidebar (ukryty) --- */
  .right-sidebar {
    display: none;
  }

  /* --- SEKCJA NAGŁÓWKA I NAWIGACJI - BEZ ZMIAN (TWOJA WERSJA) --- */
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    max-width: 100%;
  }

  .logo {
    order: 1;
    flex: 0 0 auto;
    font-size: 1.1rem;
  }

  .hamburger-top {
    display: block;
    order: 2;
    flex: 0 0 auto;
    font-size: 1.3rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.1rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .login-link {
    order: 3;
    flex: 0 0 auto;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255);
	backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 8px;
    padding: 1rem;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-radius: 0 0 var(--radius) var(--radius);
	width: fit-content;
	margin: 0 auto;
  }
  
   nav.open {
    display: flex;
  }

  nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.3rem;
    border-radius: 6px;
  }
  /* --- KONIEC SEKCJI NAGŁÓWKA --- */


  /* --- Główne elementy strony (zadania, odpowiedzi) --- */
  
  /* Zmniejszono padding w głównym kontenerze zadania */
  .task, .info {
      padding: 1rem;
  }
  
  /* Zachowujemy układ jednokolumnowy dla odpowiedzi - to kluczowe dla użyteczności */
  .answer-options {
    grid-template-columns: 1fr;
    gap: 0.5rem; /* Mniejszy odstęp między przyciskami */
  }

  .answer-button {
    /* Przywrócono oryginalny rozmiar czcionki */
    font-size: 0.95rem; 
    /* Zmniejszony padding, aby przyciski nie były tak wysokie */
    padding: 0.8rem 1rem; 
  }
  
 .task h3, .info h3 {
  font-size: 1rem;
}
  
 .task p.question, .info p.content {
  font-size: 1rem;
}
  
 .solution {
  font-size: 1rem;
  padding: 0.1rem

}

.solution.show {
  display: block;
  animation: slideIn 0.3s ease;
}
  
 .solution strong {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}
  
 .task button.check-answer,
.task button.show-answer,
.task button.ask-question,
.task button.check-subtask {
  padding: 0.75rem 0.7rem;
  font-size: 1rem;
}

.task button.check-answer:active,
.task button.show-answer:active,
.task button.ask-question:active,
.task button.check-subtask:active {
  transform: none;
}

/* Wyłącz efekty hover */
  .task button.check-answer:hover,
  .task button.show-answer:hover,
  .task button.ask-question:hover,
  .task button.check-subtask:hover {
    background: linear-gradient(45deg, var(--accent), var(--highlight)); /* Bez zmiany tła */
    transform: none; /* Bez przesunięcia */
    box-shadow: none; /* Bez cienia */
  }
  
.solution p {
  margin-bottom: 0.75rem;
  margin-top: 0.75rem;
  position: relative;
  padding-left: 1rem;
}
 
 
 
  
}



