:root {
  --bg: #0f0f11;
  --text: #e0e0e0;
  --accent: #5c7cfa;
  --card: #1a1b1f;
  --border: #2a2b30;
  --green: #4ad66d;
  --blue-faded: #5c7cfa;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

header {
  background: #15161b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  padding: 0.4rem 0;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo-image {
  height: 18px;
  width: auto;
  object-fit: contain;
}

#language-switcher {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  color: var(--text);
  background-color: var(--card);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#language-switcher:hover,
#language-switcher:focus {
  border-color: var(--accent);
  background-color: var(--border);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  outline: none;
}

#language-switcher option {
  background-color: var(--card);
  color: var(--text);
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  font-weight: 700;
  color: var(--text);
}

.section-block {
  margin-bottom: 5rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem 2rem;
}

.game-card {
  background-color: var(--card);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: nowrap;
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.game-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.game-header h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.game-version {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

.db .game-version {
  background: linear-gradient(135deg, #2fa94c, #1e7d38);
}

.arn .game-version {
  background: linear-gradient(135deg, #5c7cfa, #3c54c2);
}

.game-card p {
  color: #bbb;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.8rem;
}

.download-text {
  padding: 0.5rem 1.2rem;
  color: #ff0000;
  cursor: default;
  user-select: text;
  font-weight: 600;
  pointer-events: none;
}

.btn {
  padding: 0.5rem 1.2rem;
  color: white;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.2s ease;
  flex-shrink: 0;
}

.btn:hover {
  color: white !important;
  text-decoration: none !important;
  transform: scale(1.03);
  filter: brightness(1.1);
}

.db .btn {
  background: linear-gradient(135deg, #2fa94c, #1e7d38);
}

.db .btn:hover {
  background: linear-gradient(135deg, #3fc25c, #25994a);
}

.arn .btn {
  background: linear-gradient(135deg, #5c7cfa, #3f52e8);
}

.arn .btn:hover {
  background: linear-gradient(135deg, #748efa, #5a68f5);
}

.pac .btn {
  background: linear-gradient(135deg, #5c7cfa, #3f52e8);
}

.pac .btn:hover {
  background: linear-gradient(135deg, #748efa, #5a68f5);
}

.cc .btn {
  background: linear-gradient(135deg, #ff1a1a, #ff8c1a, #ffff1a, #1aff4b, #1ad4ff, #1a5eff, #9a1aff);
}

.cc .btn:hover {
  background: linear-gradient(135deg, #ff4d4d, #ffb94d, #ffff7a, #4dff76, #4de0ff, #4d87ff, #cc4dff);
}

.platform-icons {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.platform-icons img {
  filter: brightness(0) invert(1);
  width: 20px;
  height: 20px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.platform-icons img:hover {
  opacity: 1;
}

footer {
  background: #15161b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-align: center;
  padding: 0.8rem 0;
  font-size: 0.85rem;
  color: #888;
  margin-top: auto;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  line-height: 1.8;
}

.contact-list li {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.contact-list a {
  color: var(--accent);
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: #82aaff;
  text-decoration: underline;
}

.contact-icon {
  width: 35px;
  height: 35px;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .header-flex {
    justify-content: center;
    gap: 1rem;
  }

  .logo-image {
    height: 20px;
  }

  .game-header h3 {
    font-size: 1rem;
  }

  .btn {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
  }

  #language-switcher {
    margin-top: 10px;
  }
}
