* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--md-sys-color-outline) var(--md-sys-color-surface-1);
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--md-sys-color-on-background);
  background: var(--md-sys-color-background);
  min-height: 100vh;
  transition: var(--theme-transition);
  -webkit-font-smoothing: antialiased;
}

body *:not(.material-icons) {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

code {
  background: var(--md-sys-color-surface-variant);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--md-sys-color-primary);
}

pre {
  background: var(--md-sys-color-surface-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 14px;
  color: var(--md-sys-color-on-surface);
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--md-sys-color-surface-1); border-radius: 6px; }
::-webkit-scrollbar-thumb { background: var(--md-sys-color-outline); border-radius: 6px; border: 2px solid var(--md-sys-color-surface-1); }
::-webkit-scrollbar-thumb:hover { background: var(--md-sys-color-primary); }

.md3-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 20px;
  border: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-sys-elevation-1);
}

.md3-button:hover {
  box-shadow: var(--md-sys-elevation-2);
  filter: brightness(1.1);
}

.md3-button:active { transform: scale(0.98); }
.md3-button:disabled { opacity: 0.5; cursor: not-allowed; }

.md3-button.outlined {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: none;
}

.md3-button.outlined:hover { background: var(--md-sys-color-surface-1); }

.md3-button.text {
  background: transparent;
  color: var(--md-sys-color-primary);
  box-shadow: none;
}

.md3-button.text:hover { background: var(--md-sys-color-surface-1); }
.md3-button .material-icons { font-size: 18px; }

.md3-icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.md3-icon-button:hover { background: var(--md-sys-color-surface-1); }

.md3-card {
  background: var(--md-sys-color-surface-1);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--md-sys-elevation-1);
  transition: box-shadow 0.2s;
}

.md3-card:hover { box-shadow: var(--md-sys-elevation-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge.success { background: rgba(46, 125, 50, 0.2); color: var(--md-sys-color-success); }
.badge.info { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
