:root {
  --bg: #0b0b0b;
  --text: #eaeaea;
  --muted: #a9a9a9;
  --card: #141414;
  --grid: #242424;
  --accent: #4ad395;
  --ring: #5aa8ff;
}

[data-theme="light"] {
  --bg: #f7f7f7;
  --text: #111;
  --muted: #555;
  --card: #fff;
  --grid: #e7e7e7;
  --accent: #198754;
  --ring: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text) !important;
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 24px 24px;
}

/* Header */
.page-header {
  position: relative;
  margin-bottom: 24px;
}

.theme-toggle {
  position: absolute;
  right: 0;
  top: 0;
  background: var(--card);
  border: 1px solid var(--grid);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 0.8;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin: 0 0 14px;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  max-width: 68ch;
}

@media (max-width: 768px) {
  h1 {
    font-size: 22px;
    padding-right: 90px;
  }
  .subtitle {
    max-width: 100%;
  }
}

/* Table Layout */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: 12px;
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--grid);
  font-size: 14px;
  line-height: 1.35;
}

.table th {
  background: var(--card);
  font-weight: 700;
  color: var(--text);
}

.table tr:last-child td {
  border-bottom: none;
}

.col-icon {
  width: 36px;
}

.col-app {
  width: 28%;
}

.col-site {
  width: 29%;
}

.col-store {
  width: 21%;
}

.col-play {
  width: 22%;
}

.app-logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.app-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-cell > span:first-child {
  font-weight: 600;
}

.badge-en {
  display: inline-block;
  border: 1px solid var(--ring);
  color: var(--ring);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.site-link {
  color: var(--ring) !important;
  text-decoration: none !important;
  border-bottom: 1px dashed rgba(127, 127, 127, 0.35) !important;
}

.site-link:hover {
  border-bottom-color: transparent !important;
  opacity: 0.9 !important;
}

.store-badges img {
  height: 36px;
  width: auto;
  display: block;
}

/* Card Layout */
.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--grid);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: block;
}

.card-title-wrapper {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card-site {
  color: var(--ring) !important;
  text-decoration: none;
  border-bottom: 1px dashed var(--ring) !important;
  width: max-content;
}

.card-site:hover {
  border-bottom-color: transparent;
  opacity: 0.9;
}

.card-stores {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.store-button img {
  height: 36px;
  width: auto;
  display: block;
}

/* Footer */
.page-footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}