@import url('https://fonts.googleapis.com/css2?family=Neucha&family=Pixelify+Sans:wght@600;700&display=swap');

@font-face {
  font-family: 'AndyBold';
  src: url('/vendor/AndyBold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --terraria-font: 'AndyBold', 'Andy', 'Neucha', 'Comic Sans MS', cursive, sans-serif;
  --pixel-font: 'Pixelify Sans', 'AndyBold', 'Neucha', monospace;
  --primary: #1DB954;
  --primary-hover: #1ED760;
  --bg: #111317;
  --surface: #1a1d24;
  --surface-light: #252a34;
  --text-primary: #f5f6fa;
  --text-secondary: #9da6b7;
  --border: #383e4d;
  --warn: #ffd043;
}

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

body {
  background:
    radial-gradient(900px 450px at 50% -100px, rgba(29, 185, 84, .08), transparent 70%),
    var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  font-family: var(--terraria-font);
  font-size: 15px;
  letter-spacing: 0.3px;
  padding: 48px 20px 64px;
}

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

@keyframes funnyWobble {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-1.5deg); }
  50% { transform: translateY(2px) rotate(1deg); }
  75% { transform: translateY(-2px) rotate(1.5deg); }
}

@keyframes funnyFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-6px) scale(1.04); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.rainbow-title {
  background: linear-gradient(90deg, #ff3366, #ff9933, #ffee00, #33cc66, #00d4ff, #b844ff, #ff3366);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: terrariaRainbow 3.5s linear infinite;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.wobble-title {
  display: inline-block;
  animation: funnyWobble 2.6s ease-in-out infinite;
}

.float-icon {
  display: inline-flex;
  animation: funnyFloat 2.8s ease-in-out infinite;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.top-nav a {
  color: #f5f6fa;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
}

.top-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

header {
  text-align: center;
  margin-bottom: 28px;
  animation: fadeUp .5s ease backwards;
}

.logo-img {
  width: 72px;
  height: 72px;
  border-radius: 0;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 0 #08090c;
}

.logo-fallback {
  width: 72px;
  height: 72px;
  border-radius: 0;
  background: var(--primary);
  color: #000;
  font-size: 36px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 3px solid #fff;
  box-shadow: inset 2px 2px 0 #fff, 0 4px 0 #08090c;
}

header h1 {
  font-size: 34px;
  font-weight: 800;
  margin-top: 18px;
  letter-spacing: 0.5px;
}

header p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: 6px;
  text-shadow: 1px 1px 0 #000;
}

.web-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(29, 185, 84, .12), rgba(26, 29, 36, .6));
  border: 2px solid rgba(29, 185, 84, .45);
  border-radius: 0;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .15s, transform .15s, box-shadow .15s;
  animation: fadeUp .5s ease backwards;
  animation-delay: .05s;
  box-shadow: 0 4px 0 #08090c;
}

.web-cta:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #08090c;
}

.web-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: rgba(29, 185, 84, .15);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.web-cta-body {
  flex: 1;
  min-width: 0;
}

.web-cta-body h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 3px;
  text-shadow: 1px 1px 0 #000;
}

.web-cta-body p {
  color: var(--text-secondary);
  font-size: 13px;
  text-shadow: 1px 1px 0 #000;
}

.web-cta-arrow {
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .15s;
}

.web-cta:hover .web-cta-arrow {
  transform: translateX(4px);
}

.info-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 16px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  animation: fadeUp .5s ease backwards;
  animation-delay: .1s;
  box-shadow: 0 4px 0 #08090c;
  text-shadow: 1px 1px 0 #000;
}

.info-banner svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.info-banner strong {
  color: var(--text-primary);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  animation: fadeUp .5s ease backwards;
  box-shadow: 0 5px 0 #08090c;
}

.card:nth-child(1) { animation-delay: .1s; }
.card:nth-child(2) { animation-delay: .17s; }
.card:nth-child(3) { animation-delay: .24s; }

.card:hover {
  border-color: #555e70;
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #08090c;
}

.card.suggested {
  border-color: var(--primary);
}

.card.suggested::before {
  content: "Для вашей системы";
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--primary);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0;
  box-shadow: 0 2px 0 #000;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(29, 185, 84, .22), rgba(29, 185, 84, .05));
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-row h2 {
  font-size: 18px;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000;
}

.pill {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 2px 8px;
  text-shadow: 1px 1px 0 #000;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  text-shadow: 1px 1px 0 #000;
}

.card-note {
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.4;
  text-shadow: 1px 1px 0 #000;
}

.card-warning {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: #ffd043;
  background: rgba(255, 208, 67, .08);
  border: 2px solid rgba(255, 208, 67, .35);
  border-radius: 0;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.4;
  margin-top: auto;
  text-shadow: 1px 1px 0 #000;
}

.card-warning svg {
  color: var(--warn);
  flex-shrink: 0;
  margin-top: 1px;
}

.seg-control {
  display: flex;
  gap: 4px;
  background: var(--surface-light);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 3px;
}

.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 8px;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
  text-shadow: 1px 1px 0 #000;
}

.seg-btn.active {
  background: var(--primary);
  color: #000;
  font-weight: 800;
  text-shadow: none;
}

.seg-btn:not(.active):hover {
  color: var(--text-primary);
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0;
  border: 2px solid #fff;
  padding: 11px 18px;
  box-shadow: inset 1px 1px 0 #fff, 0 4px 0 #000;
  transition: background .15s, transform .1s;
}

.download-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: inset 1px 1px 0 #fff, 0 6px 0 #000;
}

.download-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #000;
}

.empty-note {
  text-align: center;
  color: var(--text-secondary);
  grid-column: 1 / -1;
  padding: 40px;
  text-shadow: 1px 1px 0 #000;
}

.changelog {
  margin-top: 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 4px 18px;
  animation: fadeUp .5s ease backwards;
  animation-delay: .3s;
  box-shadow: 0 4px 0 #08090c;
}

.changelog summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-shadow: 1px 1px 0 #000;
}

.changelog summary::-webkit-details-marker {
  display: none;
}

.changelog summary::after {
  content: "▾";
  color: var(--text-secondary);
  transition: transform .15s;
}

.changelog[open] summary::after {
  transform: rotate(180deg);
}

.changelog p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  padding-bottom: 16px;
  text-shadow: 1px 1px 0 #000;
}

footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 36px;
  text-shadow: 1px 1px 0 #000;
}
