* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #202124;
}

.site-header {
  background: #ffffff;
  margin-bottom: 24px;
}

.site-header-main {
  background: #002b5c;
  color: #ffffff;
}

.site-header-inner {
  max-width: 1200px;
  min-height: 86px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-logo-link {
  display: inline-flex;
  flex-shrink: 0;
}

.site-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.site-title-block {
  flex: 1;
  min-width: 0;
}

.site-title {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 400;
  color: #d9e8ff;
}

.site-subtitle {
  margin-top: 4px;
  font-size: 15px;
  color: #ffffff;
}

.main-site-button {
  display: inline-block;
  flex-shrink: 0;
  padding: 8px 14px;
  background: #2f67a8;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  border-radius: 2px;
}

.main-site-button:hover {
  background: #3d78be;
}

.repository-title {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7px 24px 6px 24px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: #002b5c;
  background: #ffffff;
}

.header-line {
  height: 2px;
  background: #002b5c;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 32px 24px;
}

.search {
  width: 100%;
  max-width: 720px;
  padding: 12px 14px;
  margin: 0 0 16px 0;
  border: 1px solid #d8dce5;
  border-radius: 10px;
  font-size: 15px;
}

.status {
  margin: 12px 0;
  color: #5f6368;
}

.year-panel,
.degree-panel {
  margin: 0 0 16px 0;
}

.year-panel-title,
.degree-panel-title {
  margin: 0 0 8px 0;
  color: #5f6368;
  font-size: 14px;
  font-weight: bold;
}

.year-buttons {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 4px 0;
  scrollbar-width: thin;
}

.degree-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.year-button,
.degree-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid #c8d7f0;
  border-radius: 999px;
  background: #ffffff;
  color: #1a73e8;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.year-button {
  flex: 0 0 auto;
  gap: 7px;
}

.year-button:hover,
.degree-button:hover {
  background: #f4f8ff;
}

.year-button.active,
.degree-button.active {
  background: #002b5c;
  border-color: #002b5c;
  color: #ffffff;
}

.year-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.year-button.active .year-count {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  display: block;
  width: 100%;
  padding: 18px;
  border: 1px solid #d8dce5;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.12);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(60, 64, 67, 0.18);
}

.card-preview-description {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  color: #202124;
  text-align: justify;
  text-justify: inter-word;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid #eceff5;
  color: #1a73e8;
  font-size: 13px;
  font-weight: bold;
}

.single-card {
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #d8dce5;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.12);
}

.single-card h1 {
  margin-top: 0;
  line-height: 1.35;
}

.bibliographic-title {
  margin: 0 0 20px 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #202124;
  text-align: justify;
  text-justify: inter-word;
}

.fields {
  margin-top: 18px;
}

.field-line {
  margin: 0 0 10px 0;
  line-height: 1.55;
  font-size: 15px;
  color: #202124;
}

.field-line strong {
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 18px;
  border-radius: 10px;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.actions .button {
  margin-top: 0;
}

.button:hover {
  background: #1557b0;
}

.button.disabled {
  background: #e8eaed;
  color: #777;
  cursor: not-allowed;
}

.button.secondary {
  border: 1px solid #c8d7f0;
  background: #ffffff;
  color: #1a73e8;
  cursor: pointer;
}

.button.secondary:hover {
  background: #f4f8ff;
}

.back {
  display: inline-block;
  margin-bottom: 18px;
  color: #1a73e8;
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
}

.empty {
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #d8dce5;
}

.share-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #eceff5;
}

.share-label {
  margin-bottom: 8px;
  color: #5f6368;
  font-size: 14px;
}

.share-row {
  display: flex;
  gap: 8px;
}

.share-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d8dce5;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafd;
}

.share-row button {
  padding: 11px 14px;
  border: 1px solid #c8d7f0;
  border-radius: 10px;
  background: #ffffff;
  color: #1a73e8;
  font-weight: bold;
  cursor: pointer;
}

.share-row button:hover {
  background: #f4f8ff;
}

.copy-status {
  min-height: 18px;
  margin-top: 8px;
  color: #5f6368;
  font-size: 13px;
}

.error-box {
  padding: 24px;
  border: 1px solid #f6aea9;
  border-radius: 16px;
  background: #fce8e6;
}

.error-box h1 {
  margin-top: 0;
  color: #c5221f;
}

.error-box p {
  line-height: 1.6;
}

.load-more-wrap {
  margin: 24px 0 8px 0;
  text-align: center;
}

.load-more-button {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid #c8d7f0;
  border-radius: 10px;
  background: #ffffff;
  color: #1a73e8;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.load-more-button:hover {
  background: #f4f8ff;
}

@media (max-width: 760px) {
  .site-header-inner {
    padding: 10px 16px;
    gap: 12px;
  }

  .site-logo {
    width: 58px;
    height: 58px;
  }

  .site-title {
    font-size: 21px;
  }

  .site-subtitle {
    font-size: 13px;
  }

  .main-site-button {
    display: none;
  }

  .repository-title {
    padding: 6px 16px 5px 16px;
    font-size: 22px;
    line-height: 1.25;
  }

  .header-line {
    height: 1px;
  }

  .page {
    padding: 0 14px 28px 14px;
  }

  .search {
    max-width: 100%;
  }

  .year-buttons,
  .degree-buttons {
    gap: 7px;
  }

  .year-button,
  .degree-button {
    padding: 8px 13px;
    font-size: 14px;
  }

  .single-card {
    padding: 18px;
  }

  .bibliographic-title {
    font-size: 16px;
    line-height: 1.4;
  }

  .card-preview-description {
    font-size: 15px;
    line-height: 1.5;
  }

  .field-line {
    font-size: 14px;
    line-height: 1.5;
  }

  .card-footer {
    margin-top: 5px;
    padding-top: 6px;
  }

  .actions {
    flex-direction: column;
  }

  .actions .button {
    width: 100%;
    text-align: center;
  }

  .share-row {
    flex-direction: column;
  }
}
.loading-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 18px 0;
  padding: 18px 20px;
  border: 1px solid #d8dce5;
  border-radius: 16px;
  background: #ffffff;
  color: #202124;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.08);
}

.loading-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: #002b5c;
}


.loading-box.in-content {
  width: 100%;
  margin: 0 0 18px 0;
}

.single-card .loading-box.in-content {
  margin-bottom: 22px;
}

.loading-box small {
  display: block;
  line-height: 1.4;
  color: #5f6368;
}

.loader-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid #d8dce5;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: loader-spin 0.9s linear infinite;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.error-status {
  padding: 14px 16px;
  border: 1px solid #f6aea9;
  border-radius: 12px;
  background: #fce8e6;
  color: #c5221f;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-line {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eceff5 25%, #f7f9fc 37%, #eceff5 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.25s ease-in-out infinite;
}

.skeleton-line-title {
  width: 75%;
  height: 22px;
  margin-bottom: 24px;
}

.skeleton-line-long {
  width: 92%;
  margin-bottom: 12px;
}

.skeleton-line-medium {
  width: 68%;
  margin-bottom: 12px;
}

.skeleton-line-short {
  width: 130px;
  margin-bottom: 0;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-spinner,
  .skeleton-line {
    animation: none;
  }
}
