* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #fff7fb;
  --accent-primary: #ff668a;
  --accent-secondary: #ffbfce;
  --text-main: #6e5057;
  --text-dark: #000000;
  --accent-hover: #78beff;
  --border-color: #ff8fab;
  --bg-surface: #ffffff;
}

body.theme-KAngel {
  --bg-primary: #fff7fb;
  --accent-primary: #ff668a;
  --accent-secondary: #ffbfce;
  --text-main: #6e5057;
  --text-dark: #000000;
  --accent-hover: #78beff;
  --border-color: #ff8fab;
  --bg-surface: #ffffff;
}

body.theme-Ame {
  --bg-primary: #0d0708;
  --accent-primary: #ff2a4b;
  --accent-secondary: #801324;
  --text-main: #f3e6e8;
  --text-dark: #ffffff;
  --accent-hover: #ff5c75;
  --border-color: #555555;
  --bg-surface: #3d171d;
}

body {
  background-color: var(--accent-secondary);
  font-family: 'Questrial', sans-serif;
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1100px;
  margin: 20px auto 0 auto;
  padding: 50px;
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-areas: 
    "header header"
    "aside main"
    "footer footer";
  gap: 20px;
}

header {
  grid-area: header;
}

header h1 {
  margin: -50px auto auto auto;
  color: var(--accent-primary);
  font-size: 90px;
  font-family: 'Water Brush', serif;
  text-align: center;
}

aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 280px;
  height: 550px;
  overflow-y: auto;
  padding-right: 5px;
}

.sidebox {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
}

.sideheaders {
  font-size: 16px;
  color: var(--accent-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

aside ul {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

aside li {
  list-style-type: none;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-secondary);
  border-radius: 4px;
  margin-bottom: 0;
  transition: transform 0.2s ease;
}

aside li:hover {
  transform: translateX(4px);
}

aside li a {
  display: block;
  padding: 8px 12px;
}

aside a, 
aside a:visited {
  color: var(--text-main);
}

aside a:hover, 
aside a:active {
  color: var(--accent-primary);
  text-shadow: none;
  font-style: normal;
}

main {
  grid-area: main;
  min-width: 300px;
  height: 550px;
  overflow-y: auto;
  padding: 25px;
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

main p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.section {
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-secondary);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}

.middleheaders {
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.collapsible {
  background-color: var(--accent-secondary);
  color: var(--text-main);
  cursor: pointer;
  padding: 10px 15px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-align: left;
  outline: none;
  font-size: 16px;
  font-family: 'Questrial', sans-serif;
  font-weight: bold;
  margin-bottom: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.collapsible:hover, .collapsible.active {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.content {
  padding: 0 5px;
  display: none;
  overflow: hidden;
  background-color: transparent;
}

footer {
  grid-area: footer;
  text-align: center;
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  color: var(--text-main);
}

a, 
a:visited {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover, 
a:active {
  color: var(--accent-hover);
  font-style: italic;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-secondary);
  border-radius: 4px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-secondary);
  border-radius: 6px;
  overflow: hidden;
}

.styled-table th, 
.styled-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--accent-secondary);
  color: var(--text-main);
}

.styled-table th {
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}

.styled-table tr:last-child td {
  border-bottom: none;
}

button.aside-img {
  width: 100px; 
  height: 35px; 
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  background: var(--accent-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button.aside-img:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-surface);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(120, 190, 255, 0.35),
    0 4px 8px rgba(110, 80, 87, 0.08);
}

button.aside-img:active {
  transform: translateY(0) scale(0.98);
}