:root {
  color-scheme: light;
  --bg: #2e3d48;
  --surface: #ffffff;
  --surface-alt: #edf3fb;
  --text: #11203a;
  --muted: #4a5c7a;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --border: #d6deeb;
  --shadow: 0 14px 32px rgba(11, 23, 54, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --footer-bg: #0d1b2a;
  --footer-text: #d9e3f3;
  --footer-border: rgba(217, 227, 243, 0.18);
  --footer-link: #c7d8f2;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
  }
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

main {
  flex: 1;
}

a,
button,
input,
textarea {
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease,
    transform 0.25s ease, box-shadow 0.25s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

#navigation {
  background: transparent !important;
  padding-top: 1rem;
  padding-bottom: 0.6rem;
}

#navigation .container,
.home-hero .container,
.games-hero .container,
.apps-section .container,
.games-section .container,
.app-detail-main .container,
#footer .container {
  max-width: 1120px;
}

#navigation .navbar {
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0.95rem;
  backdrop-filter: blur(10px);
}

#navigation .navbar-brand {
  color: var(--text) !important;
  font-weight: 800;
  letter-spacing: 0.2px;
}

#navigation .navbar-brand img {
  border-radius: 10px;
}

#navigation .navbar-toggler {
  border-radius: 12px;
}

#navigation .navbar .nav-link {
  color: var(--text) !important;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 0.85rem !important;
}

#navigation .navbar .nav-link:hover {
  background: rgba(15, 118, 110, 0.16);
}

#navigation .navbar .nav-link[aria-current="page"] {
  background: var(--accent);
  color: #ffffff !important;
}

.home-hero {
  padding: 1.2rem 1rem 0.4rem;
}

.home-hero .container {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem;
}

.home-hero .home-title,
.games-hero .games-title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  letter-spacing: -0.02em;
  color: #f7fbff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.home-hero .home-subtitle,
.games-hero .games-subtitle {
  color: #e7f0fb !important;
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 0.8rem 0 0;
  max-width: 760px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.apps-section {
  padding: 1.4rem 1rem 3.4rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.app-card:hover,
.app-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 30px rgba(11, 23, 54, 0.2);
}

.app-card-media {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.app-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.app-card-media-pcn {
  background: #2196f3;
  border-color: #2196f3;
}

.app-card-media-scn {
  background: #f3e5ab;
  border-color: #f3e5ab;
}

.app-card-media-mm {
  background: #2e70ac;
  border-color: #2e70ac;
}

.app-card-media-pd {
  background: #aed68e;
  border-color: #aed68e;
}

.app-card-media-centum {
  background: #95e1d3;
  border-color: #95e1d3;
}

.app-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.24rem;
}

.app-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.5;
}

.app-card-link {
  margin-top: auto;
  color: var(--accent) !important;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-top: 1rem;
}

.app-card-link:hover {
  color: var(--accent-strong) !important;
}

.games-section {
  padding: 0.6rem 1rem 3.2rem;
}

.games-hero {
  padding: 0 1rem 0.2rem;
}

.games-hero .container {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem;
}

.games-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px);
  justify-content: start;
}

.app-detail-main {
  padding: 1.6rem 1rem 3.2rem;
}

.app-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 2.6vw, 2rem);
}

.app-detail-header {
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 1rem;
}

.app-detail-icon {
  width: 94px;
  height: 94px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  display: grid;
  place-items: center;
}

.app-detail-icon img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.app-detail-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.app-detail-title {
  margin: 0.2rem 0 0;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.app-detail-description {
  margin: 0.5rem 0 1.15rem;
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 76ch;
}

.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.38rem 0.68rem;
}

.app-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.app-panel {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.app-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
}

.app-panel p,
.app-panel ul {
  margin-top: 0.7rem;
  margin-bottom: 0;
  color: var(--muted);
}

.app-panel ul {
  padding-left: 1.1rem;
}

.app-panel li + li {
  margin-top: 0.42rem;
}

.app-note {
  margin-top: 1rem;
  background: rgba(15, 118, 110, 0.12);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  color: var(--text);
  padding: 0.9rem 1rem;
}

.app-note h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.app-note p {
  margin: 0.6rem 0 0;
  color: var(--text);
}

.app-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.app-links .store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.app-links .store-btn img {
  display: block;
  width: 185px;
  height: auto;
}

.app-links .btn-link-pill {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text) !important;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.app-links .btn-link-pill:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

@media (max-width: 460px) {
  .app-links .store-btn img {
    width: 164px;
  }
}

#footer {
  background: transparent !important;
  padding: 0.4rem 1rem 1.6rem;
}

#footer .container {
  background: var(--footer-bg);
  border: 1px solid var(--footer-border);
  border-radius: 26px;
  padding: 1.7rem clamp(1rem, 2.6vw, 2rem);
}

#footer h4 {
  color: #ffffff !important;
}

#footer p,
#footer .tc-4279,
#footer .tc-426 {
  color: var(--footer-text) !important;
}

#footer a {
  color: var(--footer-link) !important;
  text-decoration: none;
}

#footer a:hover {
  color: #ffffff !important;
}

.scrollToTop {
  border-radius: 999px;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

.scroll-to-top-btn-icon {
  stroke: #ffffff;
}

@media (max-width: 991.98px) {
  #navigation .navbar {
    border-radius: 20px;
  }

  #navigation .navbar-collapse {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
  }

  .app-detail-header {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-title,
  .home-subtitle,
  .app-card,
  .app-detail-card {
    animation: rise-in 0.45s ease both;
  }

  .app-card:nth-child(2) {
    animation-delay: 0.06s;
  }

  .app-card:nth-child(3) {
    animation-delay: 0.12s;
  }

  .app-card:nth-child(4) {
    animation-delay: 0.18s;
  }

  .app-card:nth-child(5) {
    animation-delay: 0.24s;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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