:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #1f2a44;
  --text-soft: #5b6782;
  --primary: #0d47a1;
  --primary-2: #1565c0;
  --primary-3: #1e88e5;
  --accent: #ffec6e;
  --border: #d6e2f3;
  --shadow-sm: 0 2px 8px rgba(13, 71, 161, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 71, 161, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f7faff 0%, #f2f6fb 100%);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

a:hover {
  color: var(--primary-3);
}

:focus-visible {
  outline: 2px solid rgba(255, 236, 110, 0.95);
  outline-offset: 2px;
}

.navbar {
  background-color: #0d47a1;
  color: white;
  padding: 0;
  min-height: 64px;
  z-index: 10;
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-container {
  width: min(1200px, 96vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 64px;
  padding: 0 0.85rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  flex: 0 0 auto;
}

.logo .bold {
  font-size: 2.0rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}

.logo .sub-logo {
  font-size: 1.8rem;
  font-weight: 500;
  color: #bbdefb;
  display: inline-block;
  line-height: 1;
  transform: scaleY(1.45);
  transform-origin: center;
}

.logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.menu {
  display: flex;
  flex: 1;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.2rem;
  min-height: 64px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.menu a {
  color: white;
  text-decoration: none;
  margin-left: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  height: 40px;
  line-height: 1;
  transition: color 0.3s ease, transform 0.2s ease;
}

.menu a:hover {
  color: #ffeb3b;
  transform: translateY(-2px);
}

.menu a.active {
  color: #ffeb3b;
  background: transparent;
  box-shadow: inset 0 -2px 0 #ffeb3b;
  border-bottom: none;
}

.hero {
  min-height: 72vh;
  background-image:
    linear-gradient(135deg, rgba(13, 71, 161, 0.9), rgba(21, 101, 192, 0.85)),
    url("/microaf/static/img/backgroud.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem 0;
}

.hero-content {
  width: min(1150px, 96vw);
  margin: 0 auto;
  padding: 0 1rem;
}

.hero .title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  margin: 0 0 1rem 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero .subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  margin: 0 0 1.8rem 0;
  color: #ebf2ff;
}

.search-form {
  width: 100%;
}

.search-alphafold-style {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 0.8rem;
}

.search-alphafold-style input {
  flex: 1;
  padding: 0.95rem 1.1rem;
  font-size: 1.08rem;
  border: 1px solid #dbe7f8;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.af-search-button-wrapper {
  position: relative;
}

.af-search-button-wrapper::after {
  display: none;
}

.af-search-button {
  padding: 0.86rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.af-search-button:hover {
  transform: translateY(-1px);
}

.examples,
.links {
  width: min(1050px, 96vw);
  margin: 0.8rem auto;
  color: var(--text-soft);
}

.examples-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.example {
  background: linear-gradient(90deg, #1a5bc2, #2a7add);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  color: #fff;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}

.summary {
  width: min(1400px, 95vw);
  margin: 2rem auto;
  background: linear-gradient(180deg, #eaf3ff 0%, #dfeeff 100%);
  border: 1px solid #c9ddfb;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  text-align: center;
  color: #19407f;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
}

.card,
.structure-info,
.browse-container,
.download-container,
.help-content,
.viewer-header {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
}

.btn,
button,
input[type="submit"],
input[type="button"] {
  border-radius: var(--radius-sm);
}

.btn,
button {
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
}

table {
  border-collapse: collapse;
}

thead th {
  letter-spacing: 0.2px;
}

@media (max-width: 992px) {
  .menu {
  display: flex;
  flex: 1;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.2rem;
  min-height: 64px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

  .menu a {
  color: white;
  text-decoration: none;
  margin-left: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  height: 40px;
  line-height: 1;
  transition: color 0.3s ease, transform 0.2s ease;
}

  .search-alphafold-style {
    flex-direction: column;
  }

  .af-search-button {
    width: 100%;
  }
}
