:root {
  --background-color: #121212;
  --text-color: #ffffff;
  --card-background: #1e1e1e;
  --card-shadow: none;
  --cursor-border: #ffffff;
  --accent-color: #ff3d00;
  --font-family: "Syne", sans-serif;
  --glass-bg: rgba(30, 30, 30, 0.5);
  --glass-border: rgba(255, 255, 255, 0.2);
}
body.light-mode {
  --background-color: #fafafa;
  --text-color: #121212;
  --card-background: #ffffff;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  --cursor-border: #121212;
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(0, 0, 0, 0.2);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  cursor: none;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.touch-device .cursor {
  display: none !important;
}

.touch-device,
.touch-device body,
.touch-device a,
.touch-device button,
.touch-device input,
.touch-device [data-cursor-text] {
  cursor: auto !important;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
}
.cursor-inner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--cursor-border);
  border-radius: 50%;
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    border-color 0.4s ease, border-width 0.4s ease, background-color 0.4s ease;
}
.cursor-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-color);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor.hovered .cursor-inner {
  transform: scale(4.5);
  border-width: 1px;
  border-color: var(--accent-color);
  background-color: var(--glass-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.cursor.hovered .cursor-text {
  opacity: 1;
}

.search-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}
.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}
.search-bar:hover {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 1rem;
  width: 0;
  opacity: 0;
  transition: width 0.4s ease, opacity 0.4s ease;
  cursor: none;
}
.search-bar:hover .search-input,
.search-input:focus {
  width: 250px;
  opacity: 1;
  margin-left: 0.5rem;
}
.search-btn {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
}
#search-results-container {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  max-height: 40vh;
  overflow-y: auto;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#search-results-container.visible {
  opacity: 1;
  visibility: visible;
}
#search-results-container a {
  display: block;
  color: var(--text-color);
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 8px;
  transition: background-color 0.2s;
  cursor: none;
}
#search-results-container a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
header {
  position: fixed;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  z-index: 1000;
  animation: fadeIn 1s ease-in-out;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  z-index: 1002;
}
.logo a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}
.nav-links {
  list-style: none;
  display: flex;
}
.nav-links li {
  position: relative;
  margin-left: 2rem;
}
.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  position: relative;
  cursor: none;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  display: block;
}
.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 1%;
  transform: translateX(80%) translateY(0px);
  width: 280px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-0%) translateY(0);
}
.dropdown-menu ul {
  list-style: none;
}
.dropdown-menu a {
  padding: 0.75rem 0;
  font-size: 0.9rem;
  white-space: nowrap;
}
.dropdown-menu a:active {
  color: var(--accent-color);
}
@media (hover: hover) and (pointer: fine) {
  .dropdown-menu a:hover {
    color: var(--accent-color);
  }
}
.dropdown-menu a::after {
  display: none;
}

.burger {
  display: none;
  cursor: pointer;
  z-index: 1002;
}
.burger div {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px;
  transition: all 0.3s ease;
}

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#bg-video-dark,
#bg-video-light {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  z-index: -2;
}
#bg-video-light {
  display: none;
}
body.light-mode #bg-video-dark {
  display: none;
}
body.light-mode #bg-video-light {
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
  transition: background-color 0.3s ease;
}
body.light-mode .hero::after {
  background: rgba(255, 255, 255, 0.5);
}

.hero h1 {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.1;
  animation: slideIn 1s ease-in-out;
  position: relative;
  z-index: 1;
  color: #ffffff;
}
body.light-mode .hero h1 {
  color: var(--text-color);
}
.hero h1 span {
  color: var(--accent-color);
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.articles {
  padding: 5rem 0;
}
.article-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 8rem;
}
.article-image,
.article-text {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
    transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}
.article-image {
  transform: translateX(-50px);
}
.article-text {
  transform: translateX(50px);
}
.article-row.reverse .article-image {
  order: 2;
  transform: translateX(50px);
}
.article-row.reverse .article-text {
  order: 1;
  transform: translateX(-50px);
}
.article-row.visible .article-image,
.article-row.visible .article-text {
  opacity: 1;
  transform: translateX(0);
}
.article-image img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  border-radius: 10px;
}
.article-text h3 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.article-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.read-more-btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border: 1px solid var(--text-color);
  border-radius: 50px;
  color: var(--text-color);
  text-decoration: none;
  cursor: none;
}
.read-more-btn:hover {
  background-color: transparent;
  color: var(--text-color);
}

.game-section {
  padding: 5rem 0;
  text-align: center;
}
#quiz-container {
  max-width: 800px;
  margin: 0 auto;
}
#quiz-question {
  font-size: 2rem;
  margin-bottom: 2rem;
  min-height: 6rem;
}
#quiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.choice-btn {
  background-color: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 1.5rem;
  font-family: var(--font-family);
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: none;
  transition: background-color 0.3s, transform 0.2s;
}
.choice-btn:hover {
  background-color: var(--text-color);
  color: var(--background-color);
  transform: translateY(-5px);
}
#quiz-feedback {
  margin-top: 2rem;
  font-size: 1.2rem;
  min-height: 2rem;
  transition: color 0.3s;
}

.content-section {
  background-color: var(--background-color);
  transition: background-color 0.3s ease;
}
.advertisement,
footer {
  padding: 5rem 0;
}
h2 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
}
.ad-container {
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}
.ad-container img {
  max-width: 100%;
  border-radius: 8px;
}
footer {
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  text-align: center;
}

.theme-toggle,
.games-toggle {
  position: fixed;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--card-background);
  box-shadow: var(--card-shadow);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: none;
  animation: floatAnimation 3s ease-in-out infinite;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.theme-toggle {
  bottom: 2rem;
  right: 2rem;
}
.games-toggle {
  bottom: 2rem;
  left: 2rem;
}
.theme-toggle .material-symbols-outlined,
.games-toggle .material-symbols-outlined {
  font-size: 24px;
  color: var(--text-color);
  transition: color 0.3s ease;
}
.theme-toggle .icon-sun {
  display: none;
}
.light-mode .theme-toggle .icon-sun {
  display: block;
}
.light-mode .theme-toggle .icon-moon {
  display: none;
}

#games-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0s 0.4s;
}
#games-popup.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s;
}
#games-popup.closing {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  transition-delay: 0s;
}
#games-popup h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
#games-popup ul {
  list-style: none;
}
#games-popup li a {
  display: block;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-color);
  transition: border-color 0.3s, background-color 0.3s;
  cursor: none;
}
#games-popup li a:hover {
  border-color: var(--glass-border);
  background-color: rgba(255, 255, 255, 0.05);
}
#close-games-popup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: none;
}

#game-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0s 0.4s;
}
#game-popup-content {
  position: relative;
  width: 90vw;
  height: 85vh;
  max-width: 1200px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1rem;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
#game-popup.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
#game-popup.visible #game-popup-content {
  transform: scale(1);
}
#game-popup.closing {
  opacity: 0;
  transition-delay: 0s;
}
#game-popup.closing #game-popup-content {
  transform: scale(0.95);
}
#close-game-popup {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 35px;
  height: 35px;
  background-color: var(--accent-color);
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: none;
  color: white;
}
#game-iframe-container {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

@keyframes floatAnimation {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 4rem;
  }
  .article-text h3 {
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  .article-row,
  .article-row.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .article-row .article-image,
  .article-row.reverse .article-image {
    order: 1;
    transform: translateX(0);
  }
  .article-row .article-text,
  .article-row.reverse .article-text {
    order: 2;
    transform: translateX(0);
  }
  .article-image img {
    height: auto;
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  .nav-links {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 100vw;
    background: var(--background-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
    z-index: 1010;
  }
  .nav-links.nav-active {
    transform: translateX(0%);
  }
  .nav-links li {
    margin: 1.5rem 0;
  }
  .has-dropdown:hover .dropdown-menu {
    display: none;
  }
  .dropdown-menu {
    position: static;
    display: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: center;
    padding: 0;
    transform: none;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
  }
  .has-dropdown.active .dropdown-menu {
    display: block;
    max-height: 300px;
  }
  .has-dropdown > a {
    text-align: center;
  }
  .dropdown-menu ul {
    padding-top: 1rem;
  }
  .dropdown-menu a {
    padding: 0.5rem 0;
    font-size: 0.9rem;
  }
  .burger {
    display: block;
    z-index: 1011;
  }
  .toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .toggle .line2 {
    opacity: 0;
  }
  .toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  #quiz-choices {
    grid-template-columns: 1fr;
  }
  #quiz-question {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  .article-text h3 {
    font-size: 1.5rem;
  }
  .article-text p {
    font-size: 1rem;
  }
  .read-more-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  .theme-toggle,
  .games-toggle {
    width: 45px;
    height: 45px;
  }
  .theme-toggle {
    bottom: 1rem;
    right: 1rem;
  }
  .games-toggle {
    bottom: 1rem;
    left: 1rem;
  }
  .search-bar:hover .search-input,
  .search-input:focus {
    width: 180px;
  }
}
