* { box-sizing: border-box; }
body {
  margin: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
}

#sidebar {
  background: #161b22;
  border-right: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1.4;
  color: #3b82f6;
  border-bottom: 1px solid #30363d;
}

.sidebar-header span {
  color: #8b949e;
  font-size: 0.8rem;
  font-weight: normal;
}

#pattern-tabs {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#pattern-tabs button {
  background: transparent;
  color: #8b949e;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

#pattern-tabs button:hover { background: #21262d; color: #c9d1d9; }
#pattern-tabs button.active {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
}

#main-content { padding: 2rem; overflow-y: auto; }

.flashcard {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 1000px;
  margin: 0 auto;
}

.card-header h1 { 
  margin-top: 0; 
  color: #3b82f6; 
  font-size: 1.8rem; 
  margin-bottom: 1.5rem;
}

.meta-panel {
  background: #0d1117;
  border: 1px solid #30363d;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.meta-row { display: flex; align-items: baseline; }
.meta-label {
  font-weight: 600;
  color: #c9d1d9;
  min-width: 140px;
  flex-shrink: 0;
}
.meta-content { color: #8b949e; line-height: 1.5; font-size: 0.95rem; }

pre {
  background: #0d1117 !important;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #21262d;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  overflow-x: auto;
}
