:root {
  --bg-main: #1e1e1e;
  --bg-card: #2d2d2d;
  --card-hi-light: #3e3e3e;
  --primary-light: #005299;
  --primary: #033663;
  --primary-dark: #022552;
  --text-main: #f1f1f1;
  --text-muted: #aaaaaa;
  --accent: #3498db;
  --radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Tilt Neon", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "XROT" 0,
    "YROT" 0;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

select {
  padding: 7px;
  color: var(--text-main);
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius);
  transition: var(--transition);
}

select::placeholder {
  color: var(--text-mute);
}

select:hover,
select:focus {
  background-color: var(--primary-light);
}

select:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
}

select:picker {
  border: 10px solid #ff0000;
  background: #ff0000;
  padding: 50px;
}

select option:checked {
  font-weight: bold;
}

input {
  padding: 7px;
  color: var(--text-main);
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius);
  transition: var(--transition);
}

input::placeholder {
  color: var(--text-mute);
}

input:hover,
input:focus {
  background-color: var(--primary-light);
}

input:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
}

a {
  color: #00ccff;
}

a:hover {
  color: #008cad;
}

.btn {
  color: var(--text-main);
  transition: var(--transition);
  background-color: var(--primary);
  border-radius: var(--radius);
}

.btn:hover {
  color: var(--text-main);
  background-color: var(--primary-light);
}

footer {
  text-align: center;
  padding: 25px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Navbar Base (Desktop) */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--primary);
  padding: 10px 20px;
  gap: 15px;
}

.nav-header {
  display: flex;
  align-items: center;
  order: 1;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 2rem;
  text-decoration: none;
  padding: 4px 20px;
  padding-left: 4px;
}

.nav-logo svg {
  max-width: 50px;
  min-width: 40px;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  padding: 4px 10px;
  border-radius: var(--radius);
  order: 2;
  width: 300px;
  min-width: 100px;
  height: 40px;
  flex-shrink: 1;
}

.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  height: 100%;
}

.nav-links {
  order: 3;
}

.nav-links ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.nav-btn {
  padding: 10px 4px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-lang-btn {
  padding: 10px;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-header {
    justify-content: space-between;
    width: 100%;
    order: 1;
  }

  .hamburger-btn {
    display: block;
  }

  .hamburger-btn .close-icon {
    display: none;
  }

  .nav-search {
    order: 3;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-links {
    display: none;
    order: 2;
    width: 100%;
  }

  .nav-links ul {
    flex-direction: column;
    width: 100%;
    gap: 5px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-btn {
    display: block; /* Zabezpečí chování jako blokový prvek */
    width: 100%; /* Roztáhne tlačítko přes celou šířku menu */
    text-align: center; /* Zarovná text tlačítka na střed */
    box-sizing: border-box; /* Počítá padding do celkové šířky */
  }

  .navbar.is-open .nav-links {
    display: flex;
  }

  .navbar.is-open .hamburger-btn .hamburger-icon {
    display: none;
  }

  .navbar.is-open .hamburger-btn .close-icon {
    display: inline;
  }
}

/* Projects Cards */
.swiper {
  width: auto;
  max-width: auto;
  height: 460px;
  padding: 20px 0;
  border-radius: 20px;
}

.swiper-slide {
  width: 90%;
  max-width: 320px;
  height: 100% !important;
  background-color: var(--card-hi-light);
  border-radius: var(--radius);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.card-btn {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  margin-top: auto;
  width: 80%;
}

/* Index */
.links-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 12px;
  width: 100%;
}

.links-index a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1 / 1;
  background-color: #2d2d2d;
  border-radius: 16px;
  border: none;
  text-decoration: none;
  transition: var(--transition);
}

.links-index svg {
  width: 80%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.links-index a:hover {
  background-color: var(--card-hi-light);
}

/* YouTube */
.yt-lazy-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius);
}

.yt-lazy-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.yt-lazy-wrapper:hover .yt-lazy-thumbnail {
  opacity: 0.85;
  transform: scale(1.02);
}

.yt-lazy-play-btn {
  position: absolute;
  width: 68px;
  height: 48px;
  background-color: rgba(33, 33, 33, 0.8);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.yt-lazy-play-btn::before {
  content: "";
  display: block;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #ffffff;
  margin: 0 auto;
}

.yt-lazy-wrapper:hover .yt-lazy-play-btn {
  background-color: #ff0000;
}

/* own games */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--card-hi-light);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-sizing: border-box;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card-media {
  width: 100%;
  background: var(--card-hi-light);
}

.card-media img {
  width: 100%;
  aspect-ratio: 2.18 / 1;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  box-sizing: border-box;
}

.game-title {
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 30px;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  margin-top: auto;
}

/*Projects*/
.project-return {
  margin-bottom: 20px;
}

.project-return-btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
}

main {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  margin: 40px auto;
  max-width: 1000px;
  width: calc(100% - 40px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

iframe {
  height: auto !important;
  aspect-ratio: 16 / 9;
}

@media (max-width: 600px) {
  .links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  main {
    padding: 15px;
  }
  .index-img {
    width: 95%;
  }

  .menu-icon {
    display: block;
  }
}

html,
body,
.no-scrollbar {
  overflow-y: auto !important;

  /* Firefox */
  scrollbar-width: none !important;

  /* IE a Edge */
  -ms-overflow-style: none !important;
}

/* WebKit (Brave, Chrome, Safari) */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
