:root {
  --theme-color-primary: #6c5ce7;
  --theme-color-secondary: #a29bfe;
  --nav-bg: #ffffff;
  --nav-text: #333333;
  --nav-hover: var(--theme-color-primary);
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #636e72;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --border-color: #ddd;
  --bg-subtle: #f0f0f0;
}

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

html {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-color);
  background: #f9f9f9;
}

header,
main,
footer {
  width: 100%;
}

main {
  flex-grow: 2;
}

h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 10px;
}

.content-header p,
.feature-card p,
footer p {
  color: var(--text-color);
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
}

.content > code {
  background: var(--card-bg);
  border: 1px solid var(--shadow-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85rem;
}

/* Bottom Tab Bar (mobile) */
.bottom-tab {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-tab__bar {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 52px;
  background: var(--nav-bg);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.dark-mode .bottom-tab__bar {
  background: rgba(30, 30, 32, 0.95);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .bottom-tab {
    display: block;
  }

  body {
    padding-bottom: 72px;
  }
}

.bottom-tab__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.9rem;
  border-radius: 12px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.bottom-tab__item i {
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.bottom-tab__item:active i {
  transform: scale(0.9);
}

.bottom-tab__item.active {
  color: var(--theme-color-primary);
  background: rgba(108, 92, 231, 0.08);
}

body.dark-mode .bottom-tab__item.active {
  background: rgba(162, 155, 254, 0.12);
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  color: var(--text-color);
  opacity: 0.8;
}

footer p {
  margin-bottom: 0;
}

/* Content */
.content-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.content-header {
  margin-bottom: 25px;
}

.content {
  max-width: 900px;
  background: var(--card-bg);
  border: 1px solid var(--shadow-color);
  border-radius: 8px;
  box-shadow: 0 2px 6px var(--shadow-color);
  padding: 1.5rem;
  margin: 0 auto;
}

.content ~ .content {
  margin-top: 40px;
}

.content h2 {
  font-size: 1.2rem;
  color: var(--theme-color-primary);
  margin-bottom: 0.5rem;
}

.content > p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Dark Mode */
body.dark-mode {
  --nav-bg: #121212;
  --nav-text: #ffffff;
  --nav-hover: var(--theme-color-secondary);
  --card-bg: #232325;
  --text-color: #f0f0f0;
  --text-muted: #b2bec3;
  --shadow-color: rgba(255, 255, 255, 0.05);
  --border-color: #444;
  --bg-subtle: #2a2a2c;
  background-color: #121212;
}

* {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Toggle */
.dark-mode-button-container {
  margin-left: auto;
  padding-left: 2rem;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .dark-mode-button-container {
    display: none;
  }
}

.mode-toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  background-color: #ccc;
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
}

body.dark-mode .mode-toggle-switch {
  background-color: #2e2e31;
}

.mode-toggle-switch::before {
  content: "\1F319";
  position: absolute;
  right: 12%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  z-index: 1;
}

body.dark-mode .mode-toggle-switch::before {
  content: "\2600\FE0F";
  right: unset;
  left: 10%;
}

.mode-toggle-switch::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 2;
}

body.dark-mode .mode-toggle-switch::after {
  background-color: #7d7d7d;
  transform: translateX(30px);
}

/* Navigation */
.top-navbar {
  background-color: var(--nav-bg);
  box-shadow: 0 2px 10px var(--shadow-color);
  width: 100%;
  position: relative;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 768px) {
  .nav-container {
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
  }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--nav-hover);
}

.nav-links a.active {
  color: var(--theme-color-primary);
  font-weight: 600;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--theme-color-primary);
}

/* Feature Highlights */
.feature-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 2.5rem auto;
}

.feature-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
  text-align: center;
}

.feature-card div {
  font-size: 2rem;
  color: var(--theme-color-primary);
  margin-bottom: 1.2rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  color: var(--theme-color-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.feature-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
}
