:root {
  --bg-dark: #0f172a;
  /* Deeper dark blue-ish gray */
  --bg-panel: rgba(30, 41, 59, 0.7);
  /* Glass panel color */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  /* Bright Blue */
  --accent-hover: #2563eb;
  --border-color: rgba(255, 255, 255, 0.1);
  --success: #10b981;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --header-height: 70px;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* --- Header --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand {
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

nav a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* --- Layout --- */
.docs-layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* --- Sidebar --- */
.sidebar {
  width: 280px;
  background: rgba(15, 23, 42, 0.6);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
}

.search-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.sidebar-title {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  display: block;
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}

.sidebar-nav a.active {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  font-weight: 600;
  border-left: 3px solid var(--accent);
}

/* --- Main Content --- */
.main-content {
  margin-left: 280px;
  /* Width of sidebar */
  flex: 1;
  padding: 40px 60px;
  max-width: 1000px;
}

h1,
h2,
h3 {
  color: #fff;
  margin-top: 0;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 1.8rem;
  margin-top: 60px;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--accent);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #e2e8f0;
}

p,
li,
dd {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

strong {
  color: #fff;
}

/* --- Law Blocks (Cards) --- */
.law-block {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* Indication it's interactive */
}

.law-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(30, 41, 59, 0.9);
}

/* Copy Hint on Hover */
.law-block::before {
  content: "📋 Kopieren";
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.law-block:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* Click Animation Effect */
.law-block:active {
  transform: scale(0.99);
}

/* Highlight Styling */
mark {
  background: rgba(59, 130, 246, 0.3);
  color: inherit;
  padding: 2px 0;
  border-radius: 2px;
}

/* --- Lists & DLs --- */
ul,
ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
}

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
}

dt {
  font-weight: 600;
  color: var(--accent);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  background: rgba(15, 23, 42, 0.95);
}

/* --- Toast Notification --- */
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: var(--success);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 2000;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 20px;
  }

  .sidebar {
    display: none;
  }

  /* Mobile sidebar hidden for now or handled via JS off-canvas */
  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}