:root {
  --bg-color: #0b0e14;
  --card-bg: #161b22;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-red: #ff3e3e;
  --accent-purple: #a371f7;
  --accent-green: #2ea043;
  --border-color: #30363d;
  --accent-orange: #ffa657;
  --accent-blue: #388bfd;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Inline SVG icon sprite */
.svg-sprite {
  display: none;
}

.ic {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

#container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  transition: padding 0.3s ease;
}

#message {
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: clamp(20px, 5vw, 32px);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.site-logo {
  width: clamp(56px, 10vw, 72px);
  height: clamp(56px, 10vw, 72px);
  margin-right: 16px;
  border-radius: 16px;
  border: 2px solid var(--accent-red);
  transition: border-color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.site-logo:hover {
  border-color: var(--accent-purple);
  transform: scale(1.05);
}

.header-text {
  display: flex;
  flex-direction: column;
}

h2 {
  color: var(--accent-red);
  font-size: 11px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

h1 {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0 0;
  letter-spacing: -1px;
}

.header-text h1 {
  background: linear-gradient(135deg, #a371f7, #ec4899, #388bfd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* App card */
.app-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.10);
  gap: 20px;
}

.app-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(163, 113, 247, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(163, 113, 247, 0.22);
}

.app-main-info {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-color: #161b22;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.app-link:hover .app-icon {
  transform: scale(1.05);
}

.app-text-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-name {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-type {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.changelog-text {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.6;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-data-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

/* Store badges */
.status-container {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.badge {
  font-size: 9px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

.badge .ic {
  font-size: 11px;
}

.badge:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.2);
}

.badge:focus-visible,
.submit-btn:focus-visible,
.support-textarea:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.badge.android {
  background: rgba(46, 160, 67, 0.15);
  color: #7ee787;
  border-color: rgba(46, 160, 67, 0.3);
}

.badge.android:hover {
  box-shadow: 0 0 12px rgba(46, 160, 67, 0.25);
  border-color: rgba(46, 160, 67, 0.5);
}

.badge.ios {
  background: rgba(56, 139, 253, 0.15);
  color: #79c0ff;
  border-color: rgba(56, 139, 253, 0.3);
}

.badge.ios:hover {
  box-shadow: 0 0 12px rgba(56, 139, 253, 0.25);
  border-color: rgba(56, 139, 253, 0.5);
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-bottom: 40px;
  color: var(--text-secondary);
  font-size: 11px;
}

.footer-info a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-links {
  margin-bottom: 8px;
}

/* Support form card */
.support-card-inline {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: clamp(24px, 5vw, 32px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  margin-top: 20px;
  position: relative;
  animation: cardFadeIn 0.4s ease-out;
}

@keyframes cardFadeIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.support-subtitle-small {
  font-size: 11px;
  color: var(--accent-red);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.support-title-big {
  font-size: 28px;
  margin: 0 0 24px 0;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.support-textarea {
  width: 100%;
  background: #0d1117;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.support-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.2);
}

.support-info-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.support-info-text a {
  color: var(--accent-blue);
  text-decoration: none;
}

.support-info-text a:hover {
  text-decoration: underline;
}

.submit-btn {
  background: var(--text-primary);
  color: var(--bg-color);
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

.form-error {
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 600;
  margin: -8px 0 16px;
}

/* Aurora background */
#aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-color);
}

#aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

#aurora .b1 {
  width: 520px;
  height: 520px;
  background: #a371f7;
  top: -120px;
  left: -80px;
  animation: auroraDrift1 22s ease-in-out infinite;
}

#aurora .b2 {
  width: 460px;
  height: 460px;
  background: #388bfd;
  bottom: -140px;
  right: -100px;
  animation: auroraDrift2 26s ease-in-out infinite;
}

#aurora .b3 {
  width: 380px;
  height: 380px;
  background: #ff3e3e;
  opacity: 0.30;
  top: 40%;
  left: 55%;
  animation: auroraDrift1 30s ease-in-out infinite reverse;
}

@keyframes auroraDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 50px) scale(1.15); }
}

@keyframes auroraDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, -40px) scale(1.1); }
}

/* Responsiveness */
@media (max-width: 900px) {
  .app-link {
    padding: 16px 20px;
  }
}

@media (max-width: 768px) {
  #container {
    padding: 24px 12px;
  }

  .app-link {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .app-main-info {
    width: 100%;
  }

  .app-data-wrapper {
    align-items: flex-start;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
  }

  .status-container {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    margin-top: 0;
  }

  .app-name {
    white-space: normal;
  }
}

/* Blurred backdrops are expensive on small screens; drop the aurora there. */
@media (max-width: 600px) {
  #aurora .blob {
    animation: none;
    filter: blur(60px);
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  #aurora .blob {
    animation: none !important;
  }

  .app-link,
  .app-icon,
  .site-logo,
  .badge,
  .submit-btn,
  .support-card-inline {
    animation: none !important;
    transition: none !important;
  }
}
