/* General Styles */
:root {
  --bg: #fffdf9;
  --bg-soft: #fff6e9;
  --surface: #ffffff;
  --text: #1f1b2d;
  --muted: #675f7d;
  --line: #ece5f7;
  --primary: #7a4cff;
  --primary-2: #a682ff;
  --accent: #ffb84d;
  --shadow: 0 16px 45px rgba(88, 58, 155, 0.12);
  --radius: 18px;
  --max: 1140px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at -10% -10%, rgba(122, 76, 255, 0.11), transparent 55%),
    radial-gradient(600px 380px at 100% -5%, rgba(255, 184, 77, 0.18), transparent 55%),
    linear-gradient(180deg, #fffdf9, #fffaf2 55%, #fffefb);
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(122, 76, 255, 0.45);
  outline-offset: 2px;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  text-align: center;
  padding: 3.5rem 1.2rem 3rem;
  margin-top: 74px;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: var(--shadow);
}

header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

header a:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

header h1, header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

header p {
  margin: 0.9rem auto 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.92);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(8px);
  background: rgba(255, 253, 249, 0.86);
  border-bottom: 1px solid rgba(122, 76, 255, 0.12);
  z-index: 20;
}

nav .menu-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 74px;
  padding: 0 1rem;
  gap: 16px;
}

nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

nav .logo img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(122, 76, 255, 0.22);
}

nav .logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

nav .menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  line-height: 1;
  padding: 6px 10px;
}

nav .menu-toggle[aria-expanded="true"] {
  border-color: rgba(122, 76, 255, 0.28);
  background: #ffffff;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 8px;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  transition: 0.15s ease;
}

nav ul li a:hover {
  text-decoration: none;
  color: var(--text);
  border-color: rgba(122, 76, 255, 0.2);
  background: #ffffff;
}

nav ul li a.active {
  color: var(--text);
  border-color: rgba(122, 76, 255, 0.28);
  background: #ffffff;
  font-weight: 600;
}

/* Mobile Menu */
@media (max-width: 768px) {
  nav .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(31, 27, 45, 0.08);
    padding: 8px;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    width: 100%;
    justify-content: center;
  }
}

/* Main Section */
main {
  text-align: center;
  padding: 3rem 1rem 4rem;
  flex: 1;
  width: min(var(--max), 100%);
  margin: 0 auto;
}

main h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.8rem;
  color: var(--text);
  line-height: 1.15;
}

main p {
  font-size: 1.05rem;
  max-width: 66ch;
  margin: 0 auto;
  line-height: 1.75;
  color: var(--muted);
}

main ul,
main ol,
.container ul,
.container ol {
  text-align: left;
  max-width: 72ch;
  margin: 0.8rem auto;
  padding-left: 1.3rem;
}

main li,
.container li {
  margin-bottom: 0.45rem;
}

/* Container for other pages */
.container {
  max-width: 860px;
  margin: 40px auto;
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.container h1,
.container h2,
.container h3,
.container p,
.container li,
.section {
  text-align: left;
}

.section {
  margin-top: 1.4rem;
  padding-top: 0.8rem;
}

.section h2 {
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 0.7rem;
}

.section h3 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.section p {
  margin: 10px 0;
}

.btn,
button,
input[type="submit"] {
  border-radius: 12px;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.92em;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

footer a {
  color: var(--primary);
}
