:root {
  --hydro-bg: #f5f7fb;
  --hydro-surface: rgba(255,255,255,.82);
  --hydro-card: #ffffff;
  --hydro-border: rgba(15, 23, 42, .08);
  --hydro-text: #172033;
  --hydro-muted: #6b7280;
  --hydro-primary: #2563eb;
  --hydro-primary-soft: rgba(37, 99, 235, .12);
  --hydro-shadow: 0 12px 36px rgba(15, 23, 42, .08);
  --hydro-radius: 20px;
}
html, body {
  position: static !important;
  width: auto !important;
  overflow: auto !important;
  background: radial-gradient(circle at top left, #eef4ff 0%, #f6f8fc 42%, #f3f5f9 100%);
  color: var(--hydro-text);
}
body {
  margin-top: 72px !important;
  min-height: 100vh;
  height: auto !important;
  overflow-y: auto !important;
  background-size: cover !important;
}
#page-header {
  height: 64px !important;
  background: rgba(255,255,255,.78) !important;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hydro-border) !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, .04);
}
#page-header .item, #page-header .header.item {
  color: #24324b !important;
  font-weight: 600;
}
#page-header .item:hover {
  background: rgba(37,99,235,.06) !important;
  color: var(--hydro-primary) !important;
}
.hydro-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto 40px;
}
.hydro-home {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hydro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, .9fr);
  gap: 20px;
}
.hydro-hero-main, .hydro-hero-side, .hydro-panel {
  background: var(--hydro-surface);
  border: 1px solid var(--hydro-border);
  box-shadow: var(--hydro-shadow);
  border-radius: var(--hydro-radius);
}
.hydro-hero-main {
  padding: 36px;
  background: linear-gradient(135deg, rgba(37,99,235,.96), rgba(59,130,246,.88));
  color: #fff;
}
.hydro-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: 12px;
  letter-spacing: .04em;
  margin-bottom: 14px;
}
.hydro-hero-main h1 {
  margin: 0 0 14px;
  font-size: 42px;
  line-height: 1.15;
}
.hydro-hero-main p {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.8;
  opacity: .94;
}
.hydro-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hydro-actions .button {
  border-radius: 12px !important;
}
.hydro-hero-side {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hydro-stat-card {
  background: #fff;
  border: 1px solid var(--hydro-border);
  border-radius: 16px;
  padding: 18px 20px;
}
.hydro-stat-label {
  font-size: 13px;
  color: var(--hydro-muted);
}
.hydro-stat-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 700;
  color: var(--hydro-text);
}
.hydro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.hydro-panel {
  padding: 22px;
}
.hydro-panel-wide {
  grid-column: span 2;
}
.hydro-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.hydro-panel-head h3 {
  margin: 0;
  font-size: 18px;
}
.hydro-panel-head a, .hydro-footer a {
  color: var(--hydro-primary);
}
.hydro-list, .hydro-rank, .hydro-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hydro-list-item, .hydro-rank-item, .hydro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.06);
  color: var(--hydro-text);
  transition: .18s ease;
}
.hydro-list-item:hover, .hydro-rank-item:hover, .hydro-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15,23,42,.06);
  border-color: rgba(37,99,235,.18);
}
.hydro-list-title, .col-title, .rank-user {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hydro-list-meta, .col-time, .rank-meta {
  color: var(--hydro-muted);
  font-size: 13px;
  white-space: nowrap;
}
.col-id, .rank-no {
  font-weight: 700;
  color: var(--hydro-primary);
  min-width: 64px;
}
.hydro-search {
  display: flex;
  gap: 10px;
}
.hydro-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--hydro-border);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  background: #fff;
}
.hydro-search button {
  border: none;
  border-radius: 14px;
  padding: 0 18px;
  background: var(--hydro-primary);
  color: #fff;
  font-weight: 700;
}
.hydro-shortcuts {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hydro-shortcuts a {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--hydro-primary-soft);
  color: var(--hydro-primary);
  font-weight: 600;
}
.hydro-footer {
  margin: 24px 0 36px;
}
.hydro-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: var(--hydro-muted);
}
.hydro-footer-sep { margin: 0 8px; }
@media (max-width: 1100px) {
  .hydro-grid { grid-template-columns: 1fr 1fr; }
  .hydro-hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hydro-shell { width: min(100vw - 16px, 100%); }
  .hydro-grid { grid-template-columns: 1fr; }
  .hydro-panel-wide { grid-column: span 1; }
  .hydro-hero-main { padding: 24px; }
  .hydro-hero-main h1 { font-size: 32px; }
  .hydro-search { flex-direction: column; }
  .hydro-footer-inner { flex-direction: column; }
}

.hydro-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hydro-page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--hydro-radius);
  background: linear-gradient(135deg, rgba(23,32,51,.96), rgba(37,99,235,.88));
  color: #fff;
  box-shadow: var(--hydro-shadow);
}
.hydro-page-hero-compact h1 {
  margin: 8px 0 10px;
  font-size: 30px;
}
.hydro-page-hero-compact p {
  margin: 0;
  max-width: 760px;
  line-height: 1.8;
  opacity: .92;
}
.hydro-pill-dark {
  background: rgba(255,255,255,.14);
  color: #fff;
}
.hydro-page-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hydro-page-hero-actions .button {
  border-radius: 12px !important;
}
.hydro-problemset-toolbar {
  padding: 18px 20px;
}
.hydro-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 180px auto;
  gap: 14px;
  align-items: center;
}
.hydro-search-id input { text-align: center; }
.hydro-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hydro-pagination-wrap {
  display: flex;
  justify-content: center;
}
.hydro-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hydro-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--hydro-border);
  color: var(--hydro-text);
  font-weight: 700;
}
.hydro-page-btn.active {
  background: var(--hydro-primary);
  color: #fff;
  border-color: transparent;
}
.hydro-page-btn.disabled {
  opacity: .45;
  pointer-events: none;
}
.hydro-table-panel {
  padding: 18px 20px 20px;
}
.hydro-muted {
  color: var(--hydro-muted);
  font-size: 13px;
}
.hydro-table-wrap {
  overflow-x: auto;
}
.hydro-problem-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.hydro-problem-table thead th {
  padding: 0 14px 10px;
  color: var(--hydro-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.hydro-problem-table thead th.col-title {
  text-align: left;
}
.hydro-problem-table tbody td {
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15,23,42,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 16px 14px;
  text-align: center;
  vertical-align: middle;
}
.hydro-problem-table tbody tr td:first-child {
  border-left: 1px solid rgba(15,23,42,.06);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}
.hydro-problem-table tbody tr td:last-child {
  border-right: 1px solid rgba(15,23,42,.06);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}
.hydro-problem-table tbody tr:hover td {
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 10px 20px rgba(15,23,42,.03);
}
.hydro-problem-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--hydro-primary-soft);
  color: var(--hydro-primary);
  font-weight: 800;
}
.hydro-problem-title-cell {
  text-align: left !important;
  min-width: 320px;
}
.hydro-problem-link {
  color: var(--hydro-text);
  font-weight: 700;
  font-size: 15px;
}
.hydro-problem-link:hover {
  color: var(--hydro-primary);
}
.hydro-problem-tags {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hydro-problem-tags .label {
  border-radius: 999px !important;
}
@media (max-width: 1100px) {
  .hydro-toolbar-grid {
    grid-template-columns: 1fr 160px;
  }
  .hydro-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .hydro-page-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
  .hydro-toolbar-grid {
    grid-template-columns: 1fr;
  }
  .hydro-problem-table {
    min-width: 860px;
  }
}


.hydro-problem-page {
  gap: 18px;
}
.hydro-problem-hero {
  padding: 30px 32px;
  border-radius: var(--hydro-radius);
  background: linear-gradient(135deg, rgba(17,24,39,.96), rgba(37,99,235,.90));
  box-shadow: var(--hydro-shadow);
  color: #fff;
}
.hydro-problem-title {
  margin: 10px 0 12px;
  font-size: 32px;
  line-height: 1.22;
}
.hydro-problem-subtitle {
  margin: 0;
  max-width: 880px;
  line-height: 1.75;
  opacity: .92;
}
.hydro-problem-meta {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hydro-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: 13px;
}
.hydro-problem-actions {
  padding: 18px 20px;
}
.hydro-actions-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.hydro-problem-actions .ui.buttons,
.hydro-problem-actions-bottom .ui.buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hydro-problem-actions .ui.buttons > .button,
.hydro-problem-actions-bottom .ui.buttons > .button {
  border-radius: 12px !important;
}
.hydro-problem-section {
  padding: 0;
  overflow: hidden;
}
.hydro-section-title {
  margin: 0;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 800;
  color: var(--hydro-text);
  border-bottom: 1px solid rgba(15,23,42,.06);
  background: rgba(248,250,252,.86);
}
.hydro-section-body {
  padding: 20px 22px;
}
.hydro-section-body pre,
.hydro-code-block {
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(15,23,42,.10);
}
.hydro-section-body table {
  width: 100%;
  border-collapse: collapse;
}
.hydro-section-body table th,
.hydro-section-body table td {
  border: 1px solid rgba(15,23,42,.12);
  padding: 10px 12px;
}
.hydro-section-body img {
  max-width: 100%;
  border-radius: 12px;
}
#show_tag_div .label {
  margin: 4px 6px 4px 0;
  border-radius: 999px !important;
}
.hydro-problem-actions-bottom {
  padding: 18px 20px;
}
@media (max-width: 720px) {
  .hydro-problem-hero {
    padding: 24px 22px;
  }
  .hydro-problem-title {
    font-size: 26px;
  }
  .hydro-actions-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
.hydro-status-page {
  gap: 20px;
}
.hydro-status-toolbar {
  padding: 20px;
}
.hydro-status-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
}
.hydro-filter-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hydro-muted);
}
.hydro-filter-field input,
.hydro-filter-field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--hydro-border);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  padding: 0 14px;
  outline: none;
  color: var(--hydro-text);
}
.hydro-filter-actions {
  display: flex;
  align-items: end;
}
.hydro-search-submit {
  height: 44px;
  border-radius: 14px !important;
  margin: 0 !important;
}
.hydro-status-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  white-space: nowrap;
}
.hydro-status-table thead th {
  padding: 0 14px 10px;
  color: var(--hydro-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.hydro-status-table tbody td {
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15,23,42,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 15px 14px;
  text-align: center;
  vertical-align: middle;
}
.hydro-status-table tbody tr td:first-child {
  border-left: 1px solid rgba(15,23,42,.06);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}
.hydro-status-table tbody tr td:last-child {
  border-right: 1px solid rgba(15,23,42,.06);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}
.hydro-status-table tbody tr:hover td {
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 10px 20px rgba(15,23,42,.03);
}
@media (max-width: 1180px) {
  .hydro-status-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hydro-filter-actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .hydro-status-filters {
    grid-template-columns: 1fr;
  }
  .hydro-status-table {
    min-width: 1080px;
  }
}
.hydro-contest-page {
  gap: 20px;
}
.hydro-contest-hero {
  background: linear-gradient(135deg, rgba(13,20,37,.96), rgba(59,130,246,.88));
}
.hydro-contest-meta {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hydro-contest-progress-panel {
  padding: 18px 20px 22px;
}
.hydro-contest-progress {
  margin-top: 8px;
}
.hydro-contest-progress .bar {
  min-height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #3b82f6) !important;
}
.hydro-contest-table tbody td:nth-child(1),
.hydro-contest-table tbody td:nth-child(2),
.hydro-contest-table tbody td:nth-last-child(-n+2) {
  text-align: center;
}
.hydro-contest-table tbody td:nth-child(5) {
  color: var(--hydro-muted);
}
@media (max-width: 720px) {
  .hydro-contest-table {
    min-width: 920px;
  }
}
.hydro-ranklist-page {
  gap: 20px;
}
.hydro-ranklist-hero {
  background: linear-gradient(135deg, rgba(20,27,45,.96), rgba(99,102,241,.88));
}
.hydro-scope-actions {
  align-items: center;
}
.hydro-scope-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
}
.hydro-scope-btn.active,
.hydro-scope-btn:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.hydro-ranklist-toolbar {
  padding: 20px;
}
.hydro-ranklist-search {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 12px;
}
.hydro-ranklist-search-field {
  width: min(320px, 100%);
}
.hydro-ranklist-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  table-layout: fixed;
}
.hydro-ranklist-table thead th {
  padding: 0 14px 10px;
  color: var(--hydro-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.hydro-ranklist-table tbody td {
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15,23,42,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 15px 14px;
  text-align: center;
  vertical-align: middle;
}
.hydro-ranklist-table tbody tr td:first-child {
  border-left: 1px solid rgba(15,23,42,.06);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}
.hydro-ranklist-table tbody tr td:last-child {
  border-right: 1px solid rgba(15,23,42,.06);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}
.hydro-ranklist-table tbody tr:hover td {
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 10px 20px rgba(15,23,42,.03);
}
.hydro-ranklist-nick {
  text-align: left !important;
}
@media (max-width: 720px) {
  .hydro-ranklist-search {
    flex-direction: column;
    align-items: stretch;
  }
  .hydro-ranklist-search-field {
    width: 100%;
  }
  .hydro-ranklist-table {
    min-width: 860px;
  }
}
.hydro-contestrank-page {
  gap: 20px;
}
.hydro-contestrank-hero {
  background: linear-gradient(135deg, rgba(18,24,42,.96), rgba(16,185,129,.78));
}
.hydro-contestrank-note {
  margin-top: 14px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 13px;
}
.hydro-contestrank-panel {
  padding: 18px 20px 20px;
}
.hydro-contestrank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  white-space: nowrap;
}
.hydro-contestrank-table thead th {
  padding: 0 14px 10px;
  color: var(--hydro-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.hydro-contestrank-table tbody td {
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15,23,42,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 14px 12px;
  text-align: center;
  vertical-align: middle;
  position: relative;
}
.hydro-contestrank-table tbody tr td:first-child {
  border-left: 1px solid rgba(15,23,42,.06);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}
.hydro-contestrank-table tbody tr td:last-child {
  border-right: 1px solid rgba(15,23,42,.06);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}
.hydro-contestrank-table tbody tr:hover td {
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 10px 20px rgba(15,23,42,.03);
}
.hydro-rank-cell {
  min-width: 72px;
}
.hydro-current-user {
  background: rgba(250, 240, 120, .75) !important;
}
.hydro-contestrank-usercell {
  text-align: left !important;
  min-width: 180px;
}
.hydro-first-blood {
  position: absolute;
  right: 6px;
  top: 4px;
  font-size: 11px;
  color: #166534;
  font-weight: 800;
}
@media (max-width: 720px) {
  .hydro-contestrank-table {
    min-width: 1100px;
  }
}
.hydro-brand {
  gap: 10px;
}
.hydro-brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(37,99,235,.22);
}
.hydro-brand-text {
  font-family: 'Exo 2';
  font-size: 1.1em;
  font-weight: 700;
}
.hydro-brand-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37,99,235,.1);
  color: var(--hydro-primary);
  font-size: 12px;
  font-weight: 700;
}
.hydro-login-page {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
}
.hydro-login-hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 24px;
  align-items: stretch;
}
.hydro-login-copy,
.hydro-login-card {
  background: var(--hydro-surface);
  border: 1px solid var(--hydro-border);
  box-shadow: var(--hydro-shadow);
  border-radius: var(--hydro-radius);
}
.hydro-login-copy {
  padding: 38px;
  background: linear-gradient(135deg, rgba(37,99,235,.96), rgba(96,165,250,.88));
  color: #fff;
}
.hydro-login-copy h1 {
  margin: 0 0 14px;
  font-size: 42px;
  line-height: 1.15;
}
.hydro-login-copy p {
  max-width: 640px;
  font-size: 16px;
  line-height: 1.85;
  opacity: .96;
}
.hydro-login-points {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hydro-login-points span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: 13px;
}
.hydro-login-card {
  padding: 28px;
}
.hydro-login-card h2 {
  margin: 0 0 18px;
  font-size: 28px;
}
.hydro-login-form {
  background: #fff;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 18px;
  padding: 20px;
}
.hydro-login-form .field label {
  display: block;
  margin-bottom: 8px;
  color: var(--hydro-muted);
  font-size: 13px;
  font-weight: 700;
}
.hydro-login-form .ui.input input {
  border-radius: 14px !important;
}
.hydro-login-submit {
  margin-top: 8px !important;
  border-radius: 14px !important;
  height: 46px;
}
.hydro-login-links {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
}
@media (max-width: 900px) {
  .hydro-login-hero {
    grid-template-columns: 1fr;
  }
}
.hydro-live-badge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 16px 36px rgba(37,99,235,.28);
}
#page-header .item,
#page-header .header.item,
#page-header .ui.dropdown .item,
#page-header .ui.simple.dropdown > .text,
#page-header .ui.menu .item {
  font-weight: 400 !important;
  letter-spacing: .01em;
}
#page-header .header.item {
  font-weight: 500 !important;
}
#page-header .header.item span,
#page-header .header.item .hydro-brand-text {
  font-weight: 500 !important;
}
#page-header .dropdown.icon,
#page-header .icon {
  opacity: .82;
}
#page-header {
  height: 56px !important;
  background: rgba(255,255,255,.86) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .035);
}
body {
  margin-top: 60px !important;
}
#menu.ui.container,
#menu.ui.stackable.mobile.ui.container.computer {
  min-height: 56px;
}
#page-header .item,
#page-header .header.item,
#page-header .ui.menu .item,
#page-header .ui.dropdown .item,
#page-header .ui.simple.dropdown > .text {
  height: 56px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #334155 !important;
  letter-spacing: 0 !important;
}
#page-header .header.item {
  font-size: 15px !important;
  font-weight: 500 !important;
  padding-left: 8px !important;
  padding-right: 16px !important;
}
#page-header .item {
  padding-left: 12px !important;
  padding-right: 12px !important;
}
#page-header .item:hover,
#page-header .ui.dropdown .item:hover,
#page-header .ui.simple.dropdown:hover > .text,
#page-header .active.item {
  background: rgba(37,99,235,.045) !important;
  color: #1d4ed8 !important;
}
#page-header .menu {
  border-radius: 14px !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 12px 32px rgba(15,23,42,.08) !important;
  overflow: hidden;
}
#page-header .ui.simple.dropdown > .menu > .item,
#page-header .ui.dropdown .menu > .item {
  height: auto !important;
  min-height: 40px;
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}
#page-header .icon {
  margin-right: 6px !important;
  opacity: .72;
}
#page-header .dropdown.icon {
  margin-left: 4px !important;
  margin-right: 0 !important;
  opacity: .58;
}
#page-header .header.item span {
  font-weight: inherit !important;
}
@media (max-width: 991px) {
  #page-header {
    height: auto !important;
  }
  #page-header .item,
  #page-header .header.item,
  #page-header .ui.menu .item {
    height: 48px !important;
  }
}
#page-header {
  height: 62px !important;
}
body {
  margin-top: 66px !important;
}
#menu.ui.container,
#menu.ui.stackable.mobile.ui.container.computer {
  min-height: 62px;
  width: min(1440px, calc(100vw - 24px)) !important;
}
#page-header .item,
#page-header .header.item,
#page-header .ui.menu .item,
#page-header .ui.dropdown .item,
#page-header .ui.simple.dropdown > .text {
  height: 62px !important;
  font-size: 15.5px !important;
  font-weight: 300 !important;
}
#page-header .header.item {
  font-size: 17px !important;
  font-weight: 400 !important;
  padding-left: 10px !important;
  padding-right: 20px !important;
}
#page-header .item {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
#page-header .ui.simple.dropdown > .menu > .item,
#page-header .ui.dropdown .menu > .item {
  font-size: 15px !important;
  font-weight: 300 !important;
}
#page-header .icon {
  opacity: .66;
}
@media (max-width: 991px) {
  #page-header .item,
  #page-header .header.item,
  #page-header .ui.menu .item {
    height: 52px !important;
    font-size: 15px !important;
  }
}
/* unified page background for legacy pages */
body {
  background:
    radial-gradient(circle at top left, #eef4ff 0%, #f6f8fc 42%, #f3f5f9 100%) fixed !important;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 240px at 8% 0%, rgba(59,130,246,.12), transparent 60%),
    radial-gradient(540px 220px at 92% 8%, rgba(99,102,241,.10), transparent 60%),
    linear-gradient(to bottom, rgba(255,255,255,.36), rgba(255,255,255,0));
  z-index: 0;
}
#page-header,
.ui.main.container,
.hydro-shell,
.hydro-page {
  position: relative;
  z-index: 1;
}
.ui.main.container {
  width: min(1320px, calc(100vw - 32px)) !important;
  margin: 24px auto 40px !important;
  padding: 28px !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 48px rgba(15,23,42,.08) !important;
  backdrop-filter: blur(18px);
}
.ui.main.container > .ui.segment,
.ui.main.container > .ui.segments,
.ui.main.container > .ui.table,
.ui.main.container > table,
.ui.main.container > .padding,
.ui.main.container > .contest,
.ui.main.container > .category,
.ui.main.container > .curr,
.ui.main.container > .ui.grid,
.ui.main.container > .ui.message,
.ui.main.container > .ui.form,
.ui.main.container > .ui.cards,
.ui.main.container > .ui.items {
  background: transparent !important;
  box-shadow: none !important;
}
.ui.main.container .ui.segment,
.ui.main.container .ui.segments,
.ui.main.container .ui.attached.segment,
.ui.main.container .ui.top.attached.segment,
.ui.main.container .ui.bottom.attached.segment,
.ui.main.container .ui.secondary.segment,
.ui.main.container .ui.raised.segment {
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 28px rgba(15,23,42,.06) !important;
}
.ui.main.container .ui.table,
.ui.main.container table {
  background: rgba(255,255,255,.82) !important;
  border-radius: 16px !important;
  overflow: hidden;
}
.ui.main.container .ui.table thead th,
.ui.main.container table thead th {
  background: rgba(248,250,252,.96) !important;
}
.ui.main.container .ui.pagination.menu,
.ui.main.container .ui.menu:not(.fixed):not(.borderless) {
  border-radius: 14px !important;
}
/* page-specific wrappers often used by legacy pages */
#curr_list,
#category,
#contest,
.curr-list,
.category-list,
.contest-list,
.homepage,
.indexpage {
  background: transparent !important;
}
@media (max-width: 991px) {
  .ui.main.container {
    width: calc(100vw - 16px) !important;
    padding: 16px !important;
    border-radius: 18px !important;
  }
}


/* keep dropdown menus visible */
#page-header,
#page-header #menu,
#page-header .right.menu,
#page-header .ui.simple.dropdown,
#page-header .ui.dropdown {
  overflow: visible !important;
}
#page-header .ui.simple.dropdown > .menu,
#page-header .ui.dropdown .menu,
#page-header .right.menu .menu {
  display: none;
  margin-top: 8px !important;
  min-width: 180px;
  z-index: 100200 !important;
}
#page-header .ui.simple.dropdown:hover > .menu,
#page-header .ui.dropdown.active > .menu,
#page-header .ui.dropdown.visible > .menu {
  display: block !important;
}
#page-header .menu {
  overflow: visible !important;
}


/* unify legacy list/course/category/contest pages */
.ui.main.container {
  background: rgba(255,255,255,.74) !important;
}
.ui.main.container > h1,
.ui.main.container > h2,
.ui.main.container > h3,
.ui.main.container .ui.header {
  color: #172033 !important;
  letter-spacing: -.01em;
}
.ui.main.container .padding,
.ui.main.container .ui.segment,
.ui.main.container .ui.segments,
.ui.main.container .ui.message,
.ui.main.container .ui.attached.segment,
.ui.main.container .ui.bottom.attached.segment,
.ui.main.container .ui.top.attached.segment,
.ui.main.container .ui.secondary.segment {
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.05) !important;
}
.ui.main.container .ui.table,
.ui.main.container table,
.ui.main.container .ui.celled.table {
  border: 1px solid rgba(15,23,42,.08) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.86) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.05) !important;
}
.ui.main.container .ui.table thead th,
.ui.main.container table thead th {
  background: rgba(248,250,252,.96) !important;
  color: #334155 !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(15,23,42,.08) !important;
}
.ui.main.container .ui.table tbody tr:hover,
.ui.main.container table tbody tr:hover {
  background: rgba(37,99,235,.03) !important;
}
.ui.main.container .ui.form input:not([type]),
.ui.main.container .ui.form input[type="text"],
.ui.main.container .ui.form input[type="password"],
.ui.main.container .ui.form select,
.ui.main.container .ui.form textarea {
  border-radius: 14px !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: none !important;
}
.ui.main.container .ui.form input:focus,
.ui.main.container .ui.form select:focus,
.ui.main.container .ui.form textarea:focus {
  border-color: rgba(37,99,235,.35) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.10) !important;
}
.ui.main.container .ui.button,
.ui.main.container button,
.ui.main.container .button {
  border-radius: 14px !important;
}
.ui.main.container .ui.pagination.menu,
.ui.main.container .ui.menu:not(.fixed):not(.borderless):not(.secondary) {
  border: 1px solid rgba(15,23,42,.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
}
.ui.main.container .ui.cards > .card,
.ui.main.container .ui.items > .item,
.ui.main.container .ui.list > .item {
  border-radius: 16px !important;
}
.ui.main.container .ui.label {
  border-radius: 999px !important;
}
#curr_list .padding,
#category .padding,
#contest .padding,
.curr .padding,
.category .padding,
.contest .padding,
.curr_list .padding {
  background: rgba(255,255,255,.80) !important;
}


/* page-specific polish for legacy compiled templates */
body.page-curr_list .ui.main.container,
body.page-category .ui.main.container,
body.page-contest .ui.main.container {
  width: min(1360px, calc(100vw - 28px)) !important;
  padding: 30px !important;
}
body.page-curr_list .ui.main.container > .ui.header,
body.page-category .ui.main.container > .ui.header,
body.page-contest .ui.main.container > .ui.header,
body.page-curr_list .ui.main.container h1,
body.page-category .ui.main.container h1,
body.page-contest .ui.main.container h1,
body.page-curr_list .ui.main.container h2,
body.page-category .ui.main.container h2,
body.page-contest .ui.main.container h2 {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 18px !important;
}
body.page-curr_list .ui.main.container .ui.grid > .column,
body.page-category .ui.main.container .ui.grid > .column,
body.page-contest .ui.main.container .ui.grid > .column {
  margin-bottom: 16px !important;
}
body.page-curr_list .ui.main.container .ui.cards > .card,
body.page-category .ui.main.container .ui.cards > .card,
body.page-contest .ui.main.container .ui.cards > .card,
body.page-curr_list .ui.main.container .ui.items > .item,
body.page-category .ui.main.container .ui.items > .item,
body.page-contest .ui.main.container .ui.items > .item {
  background: rgba(255,255,255,.84) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 10px 30px rgba(15,23,42,.05) !important;
}
body.page-curr_list .ui.main.container .ui.list > .item,
body.page-category .ui.main.container .ui.list > .item,
body.page-contest .ui.main.container .ui.list > .item {
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.75) !important;
  margin-bottom: 8px !important;
}
body.page-curr_list .ui.main.container .ui.menu .item.active,
body.page-category .ui.main.container .ui.menu .item.active,
body.page-contest .ui.main.container .ui.menu .item.active {
  background: rgba(37,99,235,.08) !important;
  color: #1d4ed8 !important;
}
body.page-curr_list .ui.main.container .ui.button.primary,
body.page-category .ui.main.container .ui.button.primary,
body.page-contest .ui.main.container .ui.button.primary,
body.page-curr_list .ui.main.container .ui.primary.button,
body.page-category .ui.main.container .ui.primary.button,
body.page-contest .ui.main.container .ui.primary.button {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
}
body.page-curr_list .ui.main.container .ui.breadcrumb,
body.page-category .ui.main.container .ui.breadcrumb,
body.page-contest .ui.main.container .ui.breadcrumb {
  background: rgba(255,255,255,.64) !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(15,23,42,.07) !important;
}


/* refined contest page */
.hydro-contest-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.hydro-contest-stat-card {
  padding: 22px 24px;
}
.hydro-contest-stat-label {
  font-size: 13px;
  color: var(--hydro-muted);
  margin-bottom: 10px;
}
.hydro-contest-stat-value {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  color: #172033;
}
.hydro-contest-stat-sub {
  margin-top: 10px;
  font-size: 13px;
  color: #7b8798;
}
.hydro-contest-problem-panel {
  overflow: hidden;
}
.hydro-contest-problem-head {
  align-items: flex-start;
}
.hydro-contest-problem-head > div {
  min-width: 0;
}
.hydro-contest-panel-note {
  margin: 6px 0 0;
  color: var(--hydro-muted);
  font-size: 13px;
}
.hydro-contest-table td,
.hydro-contest-table th {
  vertical-align: middle;
}
.hydro-contest-table td:first-child,
.hydro-contest-table th:first-child,
.hydro-contest-table td:nth-child(2),
.hydro-contest-table th:nth-child(2),
.hydro-contest-table td:nth-last-child(-n+2),
.hydro-contest-table th:nth-last-child(-n+2) {
  text-align: center;
  white-space: nowrap;
}
.hydro-contest-table .hydro-problem-title-cell a {
  font-weight: 600;
  color: #172033;
}
.hydro-contest-table .hydro-problem-title-cell a:hover {
  color: var(--hydro-primary);
}
.hydro-problem-section .hydro-section-body {
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 16px;
  padding: 18px 20px;
}
@media (max-width: 900px) {
  .hydro-contest-overview-grid {
    grid-template-columns: 1fr;
  }
}


.hydro-contest-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.hydro-contest-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.12);
  color: #1d4ed8;
  font-weight: 600;
  transition: .18s ease;
}
.hydro-contest-shortcut:hover {
  background: rgba(37,99,235,.14);
  border-color: rgba(37,99,235,.18);
  transform: translateY(-1px);
}


/* low-risk polish for legacy compiled pages */
body.page-curr_list .padding,
body.page-category .padding,
body.page-contest .padding,
body.page-contestset .padding,
body.page-category1 .padding {
  width: min(1360px, calc(100vw - 28px)) !important;
  margin: 0 auto 28px !important;
  padding: 28px !important;
  background: rgba(255,255,255,.74) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 16px 40px rgba(15,23,42,.06) !important;
  border-radius: 24px !important;
  backdrop-filter: blur(12px) !important;
}
body.page-curr_list .padding > h1,
body.page-category .padding > h1,
body.page-contest .padding > h1,
body.page-contestset .padding > h1,
body.page-category1 .padding > h1,
body.page-curr_list .padding > h2,
body.page-category .padding > h2,
body.page-contest .padding > h2,
body.page-contestset .padding > h2,
body.page-category1 .padding > h2 {
  margin: 0 0 18px !important;
  font-size: 30px !important;
  line-height: 1.2 !important;
  color: #172033 !important;
  letter-spacing: -.02em !important;
}
body.page-curr_list .padding .ui.buttons .button,
body.page-category .padding .ui.buttons .button,
body.page-contest .padding .ui.buttons .button,
body.page-contestset .padding .ui.buttons .button,
body.page-category1 .padding .ui.buttons .button {
  border-radius: 14px !important;
}
body.page-curr_list .padding .ui.pointing.below.label,
body.page-category .padding .ui.pointing.below.label,
body.page-contest .padding .ui.pointing.below.label,
body.page-contestset .padding .ui.pointing.below.label,
body.page-category1 .padding .ui.pointing.below.label {
  background: rgba(37,99,235,.08) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37,99,235,.10) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
body.page-curr_list .padding .ui.pointing.below.label:before,
body.page-category .padding .ui.pointing.below.label:before,
body.page-contest .padding .ui.pointing.below.label:before,
body.page-contestset .padding .ui.pointing.below.label:before,
body.page-category1 .padding .ui.pointing.below.label:before {
  display: none !important;
}
body.page-curr_list .padding .ui.grid,
body.page-category .padding .ui.grid,
body.page-contest .padding .ui.grid,
body.page-contestset .padding .ui.grid,
body.page-category1 .padding .ui.grid {
  margin-top: 0 !important;
}
body.page-curr_list .padding .ui.segment,
body.page-category .padding .ui.segment,
body.page-contest .padding .ui.segment,
body.page-contestset .padding .ui.segment,
body.page-category1 .padding .ui.segment {
  border-radius: 18px !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.05) !important;
}
body.page-curr_list .padding .ui.table,
body.page-category .padding .ui.table,
body.page-contest .padding .ui.table,
body.page-contestset .padding .ui.table,
body.page-category1 .padding .ui.table {
  border-radius: 18px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,.9) !important;
}
body.page-curr_list .padding .ui.table thead th,
body.page-category .padding .ui.table thead th,
body.page-contest .padding .ui.table thead th,
body.page-contestset .padding .ui.table thead th,
body.page-category1 .padding .ui.table thead th {
  background: rgba(248,250,252,.98) !important;
  color: #334155 !important;
  font-weight: 600 !important;
}
body.page-curr_list .padding .ui.table tbody tr:hover,
body.page-category .padding .ui.table tbody tr:hover,
body.page-contest .padding .ui.table tbody tr:hover,
body.page-contestset .padding .ui.table tbody tr:hover,
body.page-category1 .padding .ui.table tbody tr:hover {
  background: rgba(37,99,235,.035) !important;
}


/* tighten gap between statement and submit area on problem page */
.hydro-problem-page {
  gap: 12px;
}
.hydro-problem-hero {
  margin-bottom: 0 !important;
}
.hydro-problem-actions {
  padding: 14px 18px !important;
  margin-top: -2px !important;
  margin-bottom: 0 !important;
}
.hydro-problem-section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.hydro-problem-section + .hydro-problem-section {
  margin-top: 10px !important;
}
.hydro-problem-actions + .hydro-problem-section {
  margin-top: 0 !important;
}
.hydro-problem-actions-bottom {
  padding: 14px 18px !important;
  margin-top: 10px !important;
}
#submitPage {
  top: 64px !important;
  margin-top: 0 !important;
}
#submitPage iframe {
  display: block;
  margin: 0 !important;
}
#main #submitPage,
.ui.main.container #submitPage,
body #submitPage {
  margin-top: 0 !important;
}
.dt-download-container,
.dt-cp-container,
.canvasDiv {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}


/* stronger compact layout for problem page */
body.page-problem #main.ui.main.container {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
body.page-problem .hydro-problem-page {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
body.page-problem .hydro-panel {
  margin: 0 !important;
}
body.page-problem .hydro-problem-actions {
  min-height: 0 !important;
}
body.page-problem .hydro-problem-section .hydro-section-title {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}
body.page-problem .hydro-problem-section .hydro-section-body {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}
body.page-problem #main > .hydro-page > * + * {
  margin-top: 8px !important;
}
body.page-problem #main > .hydro-page > .hydro-problem-actions + .hydro-problem-section {
  margin-top: 4px !important;
}
body.page-problem #main > .hydro-page > .hydro-problem-section + .hydro-problem-actions-bottom {
  margin-top: 8px !important;
}
body.page-problem #submit-buttons {
  margin-bottom: 0 !important;
}
body.page-problem #submitPage.container {
  padding: 0 !important;
}


/* hide globally injected huaban blocks on problem page to remove phantom whitespace */
body.page-problem #main > .isshow,
body.page-problem #main > #canvasDiv,
body.page-problem #main > .canvasDiv,
body.page-problem #main > .dt-download-container,
body.page-problem #main > .dt-cp-container,
body.page-problem #main > script[src*="huaban/"],
body.page-problem #main canvas#c {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.page-problem #main > .canvasDiv,
body.page-problem #main > #canvasDiv {
  width: 0 !important;
}
