:root {
  /* Scheme 2: Friendly & Playful */
  --primary-color: #4ECDC4;      /* Sky Blue */
  --secondary-color: #FFFFFF;     /* White */
  --accent-color: #FFD166;       /* Sunshine Yellow */
  --accent-color-2: #FF6B6B;      /* Coral Pink */
  --text-color: #4A4A4A;         /* Dark Brown */
  --text-light: #757575;         /* Lighter Brown/Gray */
  
  --section-padding: 5rem 2rem;
  --card-shadow: 0 6px 20px rgba(74, 74, 74, 0.08);
  --border-radius: 20px;

  --font-pixel: 'Press Start 2P', cursive;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  background-color: #fffbf5; /* A soft, warm off-white that complements the header/footer */
  color: var(--text-color);
  line-height: 1.6;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: 1400px; /* Increased max-width for the new layout */
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: var(--section-padding);
  scroll-margin-top: 5rem; /* Offset for the sticky header */
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 5rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-title p {
  font-size: 2.2rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-color);
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 0.9rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* --- Header --- */
.header {
  background-color: rgba(255, 251, 245, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.header-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.logo-avatar {
  height: 50px; /* Reduced for better balance */
  border-radius: 50%;
  margin-left: 40px;
}

.header-nav ul {
  list-style: none;
  display: flex;
  gap: 4rem;
}

.header-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 2rem; /* Increased as requested */
  font-weight: 500; /* Bolder for better presence */
  letter-spacing: 1.5px; /* Spaced out for an elegant look */
  position: relative;
  padding-bottom: 0.5rem;
  transition: color 0.3s ease; /* Smooth color transition */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* Subtle shadow for depth */
}

.header-nav a:hover {
  color: var(--primary-color);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.header-nav a:hover::after {
  width: 100%;
}

/* --- Hero --- */
.hero-section {
  padding: 0;
  line-height: 0; /* Prevents extra space below the image */
  width: 100%;
  aspect-ratio: 2.5 / 1;
  background-color: #f5f5f5; /* Placeholder color for when image fails to load */
}

.hero-section img {
    width: 100%;
    height: 100%; /* Fill the container which has the aspect ratio */
    object-fit: cover;
    display: block;
}

/* --- About Us --- */
.about-section .container .about-content-wrapper {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin: 3rem auto 0;
  max-width: 1100px;
  /* Glassmorphism effect for the entire container */
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(110%);
  -webkit-backdrop-filter: blur(20px) saturate(110%);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-section .container .about-content-wrapper:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.about-image {
  flex: 1;
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--border-radius);
}

.about-text {
  flex: 1;
  /* Resetting styles as they are now on the parent */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
}

.about-text h3 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 2rem;
  color: var(--text-light);
}

/* --- Generic Carousel --- */
.carousel-container {
    position: relative;
    max-width: 1144px; /* Adjusted for a ~90px 'peek' on each side (900px card + 32px gap) */
    margin: 0 auto;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
}

.carousel-btn {
    position: absolute;
    top: 40%; 
    transform: translateY(-50%);
    z-index: 10;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:hover svg {
    stroke: var(--secondary-color);
}

.carousel-btn.prev {
    left: -80px;
}

.carousel-btn.next {
    right: -80px;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    transition: stroke 0.2s ease-in-out;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
    background-color: #f0f0f0;
}
.carousel-btn:disabled:hover {
    background-color: #f0f0f0;
}

.carousel-btn:disabled svg {
    stroke: #aaa;
}

.card-gallery-grid {
  display: flex;
  gap: 2rem;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Generic Card --- */
.card {
  width: 900px;
  flex-shrink: 0;
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  text-align: center;
  transition: all 0.3s ease;
}


.card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(74, 74, 74, 0.15);
}

.card-image-container {
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-overlay .game-description {
    margin: 0;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1.6;
}

.card-overlay .game-description h5 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-family: 'Noto Sans SC', sans-serif;
}

.tool-overlay-description {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1.7;
    font-family: 'Noto Sans SC', sans-serif;
}

.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1.5rem;
}

.card-content h4 {
  font-size: 2rem;
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.card-content h4 a, .card-content h4 a:visited {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

.card-content h4 a:hover {
    color: var(--primary-color);
}

/* --- Game Card Specific --- */
#games, #tools, #videos {
  position: relative;
  overflow: hidden; /* Ensures the image doesn't bleed out */
}

/* Glassmorphism overlay for the Tools section to distinguish it */
#tools::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(48, 86, 83, 0.2); /* Further reduced opacity for a more subtle overlay. */
    backdrop-filter: blur(10px) saturate(180%); /* Restored saturation for a vibrant, high-end feel. */
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    z-index: 0; /* Position it between the background image (z-index: -1) and the content */
}

/* Ensure the content of the tools section appears above the new overlay */
#tools .container {
    position: relative; /* Required for z-index to work */
    z-index: 1; /* Place content above the ::before pseudo-element */
}

#tools .section-title h2 {
    color: var(--secondary-color);
}

.games-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio, cover the entire section */
    object-position: center; /* Center the image */
    z-index: -1; /* Position behind the content */
    opacity: 1; /* Make the image fully opaque as requested. */
    pointer-events: none; /* Prevent interaction with the image */
}

#games .card-content h4 {
  font-family: var(--font-pixel);
}

/* High-end frosted glass effect for card titles */
#games .card-content h4,
#tools .tool-card .card-content h4,
.video-card .card-content h4 {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(78, 205, 196, 0.15); /* 15% opacity for a more subtle effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.25); /* Brighter border for a premium glass effect */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Subtle shadow to lift the element */
    transition: all 0.3s ease;
}

#games .card-content h4:hover,
#tools .tool-card .card-content h4:hover,
.video-card:hover .card-content h4 {
    background: rgba(78, 205, 196, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px); /* Add a subtle lift on hover */
}

/* On hover, change the link text to white for better contrast and a premium feel */
#games .card-content h4:hover a,
#tools .tool-card .card-content h4:hover a,
.video-card:hover .card-content h4 {
    color: var(--secondary-color);
}

.game-info-box {
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem 2rem;
  margin: 2rem auto 0;
  max-width: 800px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Tool & Video Card Specifics --- */
.tool-card .card-content h4,
.video-card .card-content h4 {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.tool-card .btn,
.video-card .btn {
    margin-top: 1rem;
}

.tool-card img {
    object-fit: contain;
}

.video-card {
    cursor: pointer;
}

.video-card img {
    object-fit: contain; /* Override the default 'cover' to ensure integrity */
}

.video-card .card-content {
  text-align: center;
}

.video-thumbnail {
  position: relative; /* This is now the positioning container for the overlay */
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  overflow: hidden;
  background-color: #2c2c2c; /* Add a dark background for letterboxing */
}

.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75); /* Made darker to match game cards */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-card:hover .play-button-overlay {
  opacity: 1;
}

.play-button-overlay svg {
  width: 50px;
  height: 50px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: transform 0.2s ease;
}

.video-card:hover .play-button-overlay svg {
    transform: scale(1.1);
}

.video-description {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

/* --- Contact --- */
.contact-section {
  background-color: #E0F7FA; /* Light tint of primary color */
}

.contact-section .section-title h2 {
  color: var(--text-color);
}

.contact-items {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  text-align: center;
  gap: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-item .icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-item .icon svg {
  width: 28px;
  height: 28px;
  fill: var(--secondary-color);
}

.contact-item .qr-code-img {
    width: 150px;
    height: 150px;
    background-color: white;
    padding: 5px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.contact-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-item p {
    font-size: 1rem;
    max-width: 250px;
    color: var(--text-light);
}

/* --- Floating Contact Button & Modal --- */
.floating-contact-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1010;
  padding: 0;
  width: 150px;
  height: 150px;
  transition: transform 0.3s ease;
}

.floating-contact-btn:hover {
  transform: scale(1.05) rotate(3deg);
}

.magnifying-glass-shape {
    position: relative;
    width: 100%;
    height: 100%;
}

.magnifying-glass-lens {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    background-color: var(--secondary-color);
    border: 8px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
    padding: 0.5rem;
}

.magnifying-glass-handle {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 50px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 6px;
    transform: rotate(45deg);
    transform-origin: top left;
}

.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(74, 74, 74, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
  padding: 1rem;
}

.contact-modal-content {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  width: 360px;
  height: 360px;
  text-align: center;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-modal-close:hover {
  color: var(--text-color);
  transform: rotate(90deg);
}

.contact-modal-content h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.contact-modal-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.contact-modal-qr {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* --- Responsive Design --- */
@media (max-width: 1280px) {
    .container {
        max-width: 992px;
    }
}

@media (max-width: 992px) {
  .section {
    padding: 3rem 1rem;
  }
  
  .about-content-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 1.5rem;
  }

  .about-text {
    order: 2;
  }
  .about-image {
    order: 1;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none; /* Simple hiding for small screens, could be replaced with a hamburger menu */
  }

  .contact-items {
    flex-direction: column;
    align-items: center;
  }
  .about-content-wrapper {
    gap: 2rem;
  }

  .card {
    width: calc(100vw - 4rem);
  }

  .carousel-container {
    max-width: 100vw;
  }

  .carousel-btn.prev {
    left: -5px;
  }
  .carousel-btn.next {
    right: -5px;
  }
}