*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.text {
  color: var(--color-text);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-primary {
  color: var(--color-primary);
}

.text-danger {
  color: var(--color-danger);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.button-primary {
  background: var(--color-primary);
  color: white;
}
.button-primary:hover {
  background: var(--color-primary-hover);
}

.link {
  color: var(--color-primary);
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}

.header {
  width: 100%;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  overflow: visible;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

.header-logo {
  display: flex;
  align-items: center;
}
.header-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}
.header-button:hover {
  background: var(--color-surface-hover);
}

.language-selector {
  position: relative;
}

.language-button {
  width: auto;
  min-width: 40px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}

.language-option {
  width: 100%;
  display: block;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.language-option:hover {
  background: var(--color-surface-hover);
}

.footer {
  width: 100%;
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
}

.footer-container {
  width: 100%;
  max-width: 1200px;
  min-height: 72px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--color-text-secondary);
}
.footer-link:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.footer-icon {
  width: 20px;
  height: 20px;
  transition: filter 0.2s ease;
  filter: var(--icon-filter);
}

.footer-copyright {
  color: var(--color-text-secondary);
  font-size: 14px;
}

body,
button,
a,
.header,
.footer,
.surface,
.language-menu {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.layout {
  width: 100%;
  max-width: 1400px;
  flex: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  min-height: 0;
}

.main-content {
  min-width: 0;
  padding: 40px 32px;
}

.sidebar {
  min-width: 0;
  padding: 24px 16px;
  border-color: var(--color-border);
}

.sidebar-left {
  border-right: 1px solid var(--color-border);
}

.sidebar-right {
  border-left: 1px solid var(--color-border);
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 24px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.sidebar-title {
  padding: 4px 8px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-button {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.sidebar-button:hover {
  background: var(--color-surface-hover);
}

.sidebar-dropdown,
.language-select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-dropdown {
  width: 100%;
}

.sidebar-dropdown:hover,
.language-select:hover {
  background: var(--color-surface-hover);
}

.sidebar-dropdown:focus,
.language-select:focus {
  border-color: var(--color-primary);
}

@media (max-width: 650px) {
  .layout {
    display: flex;
    flex-direction: column;
  }
  .main-content {
    order: 1;
    padding: 24px 16px;
  }
  .sidebar-left {
    order: 2;
    border-right: 0;
    border-top: 1px solid var(--color-border);
  }
  .sidebar-right {
    order: 3;
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }
  .sidebar {
    width: 100%;
    padding: 16px;
  }
  .sidebar-content {
    position: static;
  }
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/google-sans:vf@5.3.1/latin-wght-normal.woff2") format("woff2-variations");
}
.font-regular {
  font-weight: 400;
}

.font-bold {
  font-weight: 700;
}

:root,
[data-theme=light] {
  --color-background: #ffffff;
  --color-surface: #f5f5f5;
  --color-surface-hover: #eeeeee;
  --color-text: #1f1f1f;
  --color-text-secondary: #6b6b6b;
  --color-border: #dddddd;
  --color-primary: #1a73e8;
  --color-primary-hover: #1557b0;
  --color-danger: #d93025;
  --icon-filter: none;
}

[data-theme=dark] {
  --color-background: #121212;
  --color-surface: #1e1e1e;
  --color-surface-hover: #2a2a2a;
  --color-text: #e8eaed;
  --color-text-secondary: #9aa0a6;
  --color-border: #3c4043;
  --color-primary: #1a73e8;
  --color-primary-hover: #1557b0;
  --color-danger: #d93025;
  --icon-filter: invert(1);
}

body {
  font-family: "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  background: var(--color-background);
  color: var(--color-text);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}
