:root {
  --primary-color: #16a34a;  
  --text-color: #1f2937;
  --bg-color: rgba(0, 128, 0, 0.03);
  --nav-bg: #f3f4f6;
  --card-bg: #f9fafb;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --border-color: rgba(0,0,0,0.1);
  --nav-bg-rgb: 243,244,246;
}

.dark-mode {
  --primary-color: #22c55e;  
  --text-color: #f3f4f6;
  --bg-color: #111827;
  --nav-bg: #1f2937;
  --card-bg: #1f2937;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --border-color: rgba(255,255,255,0.1);
  --nav-bg-rgb: 31,41,55;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: rgba(var(--nav-bg-rgb), 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px var(--shadow-color);
  border-bottom: 1px solid var(--border-color);
}

.logo-img{
  height: 10vh;
  scale: 2;
}


#theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-color);
  padding: 0.75rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

#theme-toggle{
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.sun-icon,
.moon-icon {
  position: absolute;
  transition: all 0.3s ease;
}

.light-mode .moon-icon {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.light-mode .sun-icon {
  opacity: 0;
  transform: translateY(20px) rotate(-90deg);
}

.dark-mode .sun-icon {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.dark-mode .moon-icon {
  opacity: 0;
  transform: translateY(-20px) rotate(90deg);
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

section {
  margin-bottom: 4rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.partner-card {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px var(--shadow-color);
  text-align: center;
}

form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--nav-bg);
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
}

textarea {
  height: 150px;
  resize: vertical;
}

button[type="submit"] {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.3s;
}

button[type="submit"]:hover {
  opacity: 0.9;
}

.course-header {
  background: linear-gradient(135deg, var(--primary-color), #22c55e);
  color: white;
  padding: 4rem;
  border-radius: 1rem;
  margin: 3rem auto;
  text-align: center;
  max-width: 600vw;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.course-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: white;
  font-weight: 800;
  letter-spacing: -1px;
}

.course-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.1) 48%, transparent 51%);
  animation: shimmer 3s infinite linear;
  transform: scale(2);
}

@keyframes shimmer {
  0% { transform: translateX(-100%) scale(2); }
  100% { transform: translateX(100%) scale(2); }
}

.course-intro {
  font-size: 1.4rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.course-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease;
}

.meta-item:hover {
  transform: translateY(-2px);
}

.tabs-section {
  max-width: 400vw;
  margin: 4rem auto;
  padding: 3rem;
  background: var(--card-bg);
  border-radius: 1.5rem;
  box-shadow: 0 15px 30px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}

.tabs-container {
  position: relative;
  margin: -3rem -3rem 2rem -3rem;
  padding: 2rem 3rem;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
}

.tabs-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.5rem;
  margin: 0 -0.5rem;
  scroll-behavior: smooth;
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

.tabs-scroll::-webkit-scrollbar {
  display: none; 
}

.tabs-scroll:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--bg-color));
  pointer-events: none;
}

.tabs-scroll:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to left, transparent, var(--bg-color));
  pointer-events: none;
  z-index: 1;
}

.tab-btn {
  white-space: nowrap;
  padding: 0.875rem 2rem;
  border: none;
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 2px 4px var(--shadow-color);
  position: relative;
  overflow: visible;
  min-width: max-content;
  letter-spacing: 0.2px;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.tab-btn:hover {
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
  font-weight: 600;
}

.tab-content {
  display: none;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 1rem;
  min-height: 300px;
  transform-origin: top;
  transition: all 0.3s ease;
  line-height: 1.8;
  font-size: 1.1rem;
  border: 1px solid var(--border-color);
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

.tab-content h3 {
  color: var(--primary-color);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.tab-content p {
  color: var(--text-color);
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding: 0 2rem;
}

.nav-btn {
  padding: 0.875rem 1.75rem;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(22, 163, 74, 0.1);
}

.nav-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(22, 163, 74, 0.2);
}

.nav-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
}

.light-mode .nav-btn:disabled {
  color: #9ca3af;
}

.feedback-section {
  max-width: 1000px;
  margin: 6rem auto;
  padding: 4rem;
  background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px var(--shadow-color);
}

.feedback-section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--primary-color), #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feedback-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 600px;
  margin: 0 auto;
}

.rating {
  text-align: center;
}

.rating h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.stars {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 2.5rem;
  margin: 1rem 0;
}

.stars i {
  cursor: pointer;
  color: #e5e7eb;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
}

.stars i:hover {
  transform: scale(1.2) rotate(5deg);
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.stars i.selected {
  color: #fbbf24;
  transform: scale(1.1);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feedback-form textarea {
  width: 100%;
  min-height: 150px;
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.6;
  transition: all 0.3s ease;
  resize: vertical;
}

.feedback-form textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

.feedback-form textarea::placeholder {
  color: #9ca3af;
}

.feedback-form button {
  align-self: flex-end;
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(22, 163, 74, 0.1);
}

.feedback-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(22, 163, 74, 0.2);
}

.feedback-form button:active {
  transform: translateY(0);
}

.breadcrumb {
  max-width: 1400px;
  margin: 1rem auto;
  padding: 1.5rem 4rem;
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  border-radius: 10px;
}

.breadcrumb i {
  font-size: 0.8rem;
  opacity: 0.6;
}

.breadcrumb a{
  color: var(--text-color);
  text-decoration: none;
}

.breadcrumb span {
  white-space: nowrap;
}

footer {
  background: var(--nav-bg);
  padding: 6rem 4rem 2rem;
  margin-top: 6rem;
  border-top: 1px solid var(--border-color);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--primary-color) 50%, 
    transparent 100%
  );
  opacity: 0.3;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-section h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 1rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.footer-section p {
  line-height: 1.7;
  opacity: 0.8;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section ul li a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0.8;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  opacity: 1;
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card-bg);
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(22, 163, 74, 0.1);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  font-size: 1.1rem;
  opacity: 0.8;
}

.footer-bottom a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

.report-bug {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
  transition: all 0.3s ease;
  z-index: 100;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.report-bug:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
}

.report-bug i {
  font-size: 1.2rem;
}

.report-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.report-modal.active {
  display: flex;
}

.report-form {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.report-form h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.close-modal:hover {
  transform: rotate(90deg);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.report-form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--nav-bg);
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
}

.report-form select:focus {
  outline: 2px solid var(--primary-color);
}

.report-form input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--nav-bg);
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.report-form input[type="email"]:focus {
  outline: 2px solid var(--primary-color);
}

.objectives-list ul {
  list-style: none;
  padding-left: 0;
}

.objectives-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1rem;
}

.objectives-list li:before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.modules-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg-color);
  border-radius: 0.5rem;
  overflow: hidden;
}

.modules-table th,
.modules-table td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.modules-table th {
  background: var(--primary-color);
  color: white;
  font-weight: 500;
}

.modules-table tr:nth-child(even) {
  background: var(--card-bg);
}

.array-visualization {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.array {
  text-align: center;
}

.array-bars {
  display: flex;
  gap: 0.5rem;
  height: 150px;
  align-items: flex-end;
}

.bar {
  width: 30px;
  background: var(--primary-color);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.array-arrow {
  color: var(--primary-color);
  font-size: 2rem;
}

.difficulty-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.difficulty-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px var(--shadow-color);
}

.difficulty-btn:hover {
  background: var(--card-bg);
  transform: translateY(-1px);
}

.difficulty-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.quiz-section {
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 12px var(--shadow-color);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.quiz-container {
}

.question {
  background: var(--bg-color);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.question h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.question p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-btn {
  padding: 1rem;
  border: none;
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: left;
  box-shadow: 0 2px 6px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.option-btn:hover {
  background: var(--bg-color);
  transform: translateY(-2px);
}

.option-btn:active {
  transform: translateY(0);
}

.option-btn.correct {
  background: #dcfce7;
  color: #16a34a;
  border-color: #16a34a;
}

.option-btn.incorrect {
  background: #fee2e2;
  color: #dc2626;
  border-color: #dc2626;
}

.quiz-results {
  text-align: center;
  padding: 3rem;
  background: var(--bg-color);
  border-radius: 1.5rem;
  box-shadow: 0 8px 20px var(--shadow-color);
  animation: fadeIn 0.5s ease-out;
  border: 1px solid var(--border-color);
}

.quiz-results .score-display {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: bold;
  animation: pulse 1.5s infinite alternate;
}

.quiz-results .appreciation {
  font-size: 1.5rem;
  margin: 1rem 0;
  color: var(--text-color);
  opacity: 0.9;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: gold;
  border-radius: 50%;
  animation: confetti-fall linear;
}

@keyframes confetti-fall {
  0% {
    top: -10%;
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.score-display {
  font-size: 2rem;
  color: var(--primary-color);
  margin: 1rem 0;
  font-weight: bold;
}

.references-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.resource-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.resource-section ul {
  list-style: none;
  padding: 0;
}

.resource-section li {
  margin-bottom: 1rem;
}

.resource-section a {
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  background: var(--card-bg);
}

.resource-section a:hover {
  transform: translateX(5px);
  background: var(--bg-color);
  color: var(--primary-color);
}

.resource-section i {
  color: var(--primary-color);
}

.bubble-sort-container {
  display: flex;
  gap: 2rem;
}

.bubble-sort-sidebar {
  display: flex;
  flex-direction: column;
  width: 200px;
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  padding: 1rem;
}

.bubble-sort-sidebar .bubble-sort-btn {
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.bubble-sort-sidebar .bubble-sort-btn:hover {
  background: var(--bg-color);
  transform: translateX(2px);
}

.bubble-sort-sidebar .bubble-sort-btn.active {
  background: var(--primary-color);
  color: white;
}

.bubble-sort-content {
  flex: 1;
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  padding: 2rem;
}

.bubble-sort-tab {
  display: none;
}

.bubble-sort-tab.active {
  display: block;
}

#bubble-sort-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.array-bars {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}

.bar {
  width: 25px;
  background-color: #16a34a;
  transition: height 0.3s ease, background-color 0.3s ease;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: white;
  font-size: 0.7em;
}

.bar.highlight {
  background-color: #dc2626; 
}

.bar.sorted {
  background-color: #059669; 
}

.start-button {
  padding: 10px 20px;
  background-color: #16a34a;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.start-button:hover {
  background-color: #059669;
}

.start-button:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  main {
    padding: 1rem;
  }

  .tabs-section {
    margin: 2rem 1rem;
  }

  .course-header {
    margin: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 2rem;
    gap: 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo svg {
    width: 32px;
    height: 32px;
  }

  nav {
    width: 100%;
    margin: 0;
  }

  nav ul {
    width: 100%;
    overflow-x: auto;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  nav a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .course-header {
    padding: 2rem;
    margin: 1.5rem 1rem;
  }

  .course-header h1 {
    font-size: 2rem;
  }

  .course-intro {
    font-size: 1rem;
    line-height: 1.5;
  }

  .course-meta {
    flex-direction: column;
    align-items: center;
    gap: 1rem !important;
  }

  .meta-item {
    font-size: 0.9rem;
  }

  .tabs-section {
    padding: 1.5rem;
    margin: 2rem 1rem;
  }

  .tabs-container {
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 1rem;
  }

  .tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .tab-content {
    padding: 1.5rem;
  }

  .feedback-section {
    padding: 2rem;
    margin: 3rem 1rem;
  }

  .feedback-section h2 {
    font-size: 1.75rem;
  }

  .stars {
    font-size: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    font-size: 0.9rem;
  }

  .array-visualization {
    flex-direction: column;
    gap: 1!rem;
  }
  
  .modules-table {
    overflow-x: auto;
  }
  
  .difficulty-selector {
    flex-direction: column;
  }

  .bubble-sort-container {
    flex-direction: column;
  }

  .bubble-sort-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }

  .bubble-sort-sidebar .bubble-sort-btn {
    margin-bottom: 0;
    margin-right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .course-header h1 {
    font-size: 1.5rem;
  }

  .tab-content {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .tab-content h3 {
    font-size: 1.5rem;
  }

  .navigation-buttons {
    padding: 0 1rem;
  }

  .feedback-section {
    padding: 1.5rem;
  }

  .feedback-form button {
    width: 100%;
    padding: 0.875rem;
  }

  .stars {
    font-size: 1.75rem;
    gap: 0.5rem;
  }

  .footer-section p {
    font-size: 1rem;
  }

  .footer-bottom {
    font-size: 0.9rem;
  }

  nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap; 
  }

  .resource-section li {
    font-size: 0.9rem;
  }
  
  .bar {
    width: 20px;
  }
}

@media (max-width: 768px) {
  .report-bug {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 320px) {
  html {
    font-size: 14px;
  }

  .course-header h1 {
    font-size: 1.5rem;
  }

  .tab-content {
    font-size: 0.9rem;
  }
}

html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 100px;
}

button, 
a {
  min-height: 44px;
  min-width: 44px;
}

img {
  max-width: 100%;
  height: auto;
}

input, 
textarea, 
select {
  font-size: 16px; 
}

.tabs-scroll,
body {
  -webkit-overflow-scrolling: touch;
}

@media (hover: none) {
  a:hover,
  button:hover {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .navigation-buttons {
    flex-direction: column; 
    align-items: center;     
    gap: 1rem;              
  }

  .nav-btn {
    width: 100%;             
    text-align: center;       
    padding: 0.75rem 1rem;   
  }
}