:root {
  /* Default to Dark Mode */
  --bg-body: #121212;
  --text-body: #e0e0e0;
  --bg-header: #1e1e1e;
  --border-header: #333333;
  --bg-sidebar: #2c3e50;
  --text-sidebar: #ecf0f1;
  --bg-sidebar-brand: #1a252f;
  --bg-sidebar-hover: #34495e;
  --border-sidebar-active: #3498db;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-body: #f4f6f9;
    --text-body: #333333;
    --bg-header: #ffffff;
    --border-header: #e1e4e8;
  }
}

[data-theme="light"] {
  --bg-body: #f4f6f9;
  --text-body: #333333;
  --bg-header: #ffffff;
  --border-header: #e1e4e8;
}

[data-theme="dark"] {
  --bg-body: #121212;
  --text-body: #e0e0e0;
  --bg-header: #1e1e1e;
  --border-header: #333333;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-body);
}

.nav-container {
  display: grid;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
  grid-template-columns: 260px 1fr;
  grid-template-rows: 64px 1fr;
  min-height: 100vh;
}

.header {
  grid-area: header;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-header);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding-left: 24px;
  font-size: 1.25rem;
  font-weight: bold;
  background: var(--bg-sidebar-brand);
  color: #fff;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar a {
  display: block;
  padding: 16px 24px;
  color: #bdc3c7;
  text-decoration: none;
  transition: 0.2s;
  border-left: 4px solid transparent;
}
.sidebar a:hover { background: var(--bg-sidebar-hover); color: #fff; border-left-color: var(--border-sidebar-active); }
.main-content { grid-area: main; padding: 32px; overflow-y: auto; }
.user-info { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #e1e4e8; }
.username { font-weight: 600; font-size: 0.9rem; }

.ooc-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ooc-item {
    flex: 1 1 200px;
    text-align: center;
}

.ooc-item img {
    max-width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.overlay:active {
    display: none;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-header);
  color: inherit;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 16px;
}
