
:root {
  --primary-color: #FF6B6B;
  --accent-color: #4ECDC4;
  --background-color: #F3F6F9;   
  --card-bg: #EDF2F4;            
  --text-main: #22223B;
  --text-muted: #8D99AE;
  --border-color: #E2E8F0;
  --link-hover: #FFB400;
  --checkbox-accent: #4ECDC4;
  --sidebar-bg: #2D3142;         
}
:root {
  --primary-color: #FF6B6B;
  --accent-color: #4ECDC4;
  --background-color: #F3F6F9;   
  --card-bg: #EDF2F4;            
  --text-main: #22223B;
  --text-muted: #8D99AE;
  --border-color: #E2E8F0;
  --link-hover: #FFB400;
  --checkbox-accent: #4ECDC4;
  --sidebar-bg: #2D3142;         
}


.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 32px 0 0 0;
  box-shadow: 2px 0 12px rgba(34,34,59,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  position: fixed;      
  top: 0;
  left: 0;
  z-index: 10;
  overflow-y: auto;
}


.main-content {
  flex: 1;
  padding: 40px 32px;
  background: var(--background-color); 
  border-radius: 0 16px 16px 0;
  box-shadow: 0 2px 24px rgba(34,34,59,0.06);
  height: 100vh;
  overflow-y: auto;
  margin-left: 240px;   
}


.card, .topic-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(34,34,59,0.04);
}


.nav-topic.active,
.nav-topic:hover {
  background: var(--accent-color);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(78,205,196,0.12);
}


.topic-section h2 {
  color: var(--primary-color);
  margin-bottom: 16px;
  font-size: 1.4rem;
}


body {
  background: var(--background-color);
  color: var(--text-main);
}


h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
}


.subtitle, .progress-label, .difficulty {
  color: var(--text-muted);
}


a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--link-hover);
}


.difficulty {
  background: var(--accent-color);
  color: #fff;
  font-size: 0.85em;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
}


.progress-bar {
  width: 100%;
  height: 18px;
  background: var(--border-color);
  border-radius: 8px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 8px;
  transition: width 0.3s;
}
.progress-label {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.95em;
  color: var(--text-main);
  font-weight: bold;
  line-height: 18px;
}


.checkbox-solved:checked {
  accent-color: var(--checkbox-accent);
}


.question-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.question-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}


li {
  margin-bottom: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}
li:last-child {
  border-bottom: none;
}

.container {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 32px 0 0 0;
  box-shadow: 2px 0 12px rgba(34,34,59,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  position: fixed;      
  top: 0;
  left: 0;
  z-index: 10;
  overflow-y: auto;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 32px;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 1px 1px 8px var(--accent-color);
}

#topic-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-topic {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 24px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-topic.active,
.nav-topic:hover {
  background: var(--accent-color); 
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(78,205,196,0.12);
}

.main-content {
  flex: 1;
  padding: 40px 32px;
  background: var(--background-color); 
  border-radius: 0 16px 16px 0;
  box-shadow: 0 2px 24px rgba(34,34,59,0.06);
  height: 100vh;
  overflow-y: auto;
  margin-left: 240px;   
}


.topbar {
  border-bottom: 1px solid var(--border-color);
}

h1 {
  font-size: 2.2rem;
  color: var(--primary-color); 
  margin-bottom: 8px;
}

.subtitle {
  color: var(--accent-color); 
  font-size: 1.1rem;
  margin-bottom: 16px;
}

#search-bar {
  width: 100%;
  padding: 10px 16px;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 24px;
  outline: none;
  transition: border 0.2s;
  background: var(--card-bg);
  color: var(--text-main);
}

#search-bar:focus {
  border-color: var(--primary-color);
}

.topic-section {
  margin-bottom: 40px;
  background: var(--card-bg); 
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(34,34,59,0.04);
  padding: 24px;
}

.topic-section h2 {
  color: var(--primary-color); 
  margin-bottom: 16px;
  font-size: 1.4rem;
}

ul {
  list-style: none;
  padding: 0;
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
    overflow-x: auto;
  }
  #topic-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 0 0.5rem;
  }
  #topic-nav a {
    padding: 0.7rem 1rem;
    margin: 0 0.2rem;
    white-space: nowrap;
  }
  .main-content {
    padding: 1.2rem 0.5rem;
  }
}
