.sidebar,
.page-frame,
body {
  --sb-page-bg: var(--page-bg, #0a0605);
  --sb-sidebar-bg: var(--sidebar-bg, linear-gradient(to bottom, color-mix(in srgb, var(--primary-accent, #992f05) 12%, var(--surface, #1a100d)), var(--surface)));
  --sb-accent: var(--primary-accent, #992f05);
  --sb-accent-deep: var(--primary-deep, #992f05);
  --sb-shadow: var(--primary-shadow, rgba(212,85,10,0.45));
  --sb-text: var(--text, #f8e7e0);
  --sb-muted: var(--muted, #c9a08a);
  --sb-surface: var(--surface, #1a100d);
  --sb-surface-2: var(--surface-2, #1f1410);
  --sb-radius: 12px;
}

body {
  margin: 0;
  font-family: Poppins, Arial, sans-serif;
  background: var(--sb-page-bg);
  color: var(--sb-text);
}

.page-frame {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  box-shadow:
    0 0 20px var(--sb-shadow),
    inset 0 0 20px var(--sb-shadow);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 60px;
  display: flex;
  flex-direction: column;
  background: var(--sb-sidebar-bg);
  background-color: var(--sb-surface);
  overflow-x: hidden;
  transition: width 0.3s ease;
  padding-top: 20px;
  box-shadow: 0 0 20px var(--sb-shadow);
  z-index: 1000;
  color: var(--sb-text);
  font-family: 'Poppins', Arial, sans-serif !important;
}

.sidebar a.settings {
  margin-top: auto;
}

.sidebar:hover {
  width: 250px;
}

.main-content {
  margin-left: 60px;
  flex: 1;
  padding: 20px;
  transition: margin-left 0.3s ease;
}
.sidebar:hover ~ .main-content {
  margin-left: 250px;
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 20px;
  padding: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-title img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 0 10px var(--sb-shadow);
}

.sidebar-title span {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--sb-accent);
}

.sidebar:not(:hover) .sidebar-title span {
  display: none;
}

.sidebar a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 18px;
  color: var(--sb-text);
  border-radius: var(--sb-radius);
  margin: 8px 10px;
  background: color-mix(in srgb, var(--sb-surface) 70%, transparent);
  box-shadow: -5px -5px 10px rgba(255,255,255,0.02);
  white-space: nowrap;
  overflow: hidden;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sidebar:not(:hover) a {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
  box-shadow: none;
}

.sidebar a:hover,
.sidebar a:focus {
  background: linear-gradient(90deg, color-mix(in srgb, var(--sb-accent) 18%, transparent), var(--sb-accent));
  transform: scale(1.05);
  box-shadow: 0 0 14px color-mix(in srgb, var(--sb-shadow) 80%, transparent);
  color: var(--on-primary, #fff0e8);
  outline: none;
}

.sidebar i {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.sidebar span {
  display: inline-flex;
  align-items: center;
  height: 20px;
}

.sidebar:not(:hover) span {
  display: none;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sb-text);
  margin: 0;
  padding: 20px 0;
  text-align: center;
  letter-spacing: 2px;
}

@media (max-width: 720px) {
  .sidebar { width: 56px; }
  .sidebar:hover { width: 220px; }
  .main-content { margin-left: 56px; }
  .sidebar:hover ~ .main-content { margin-left: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .main-content, .sidebar a { transition: none !important; animation: none !important; }
}
