/* ==================== CSS Variables ==================== */
:root {
  --primary-color: #ff6f61;
  --primary-dark: #e55b50;
  --primary-light: #ff8a7f;
  --secondary-color: #155515;
  --secondary-dark: #0f3f0f;
  --bg-dark: #000000;
  --bg-overlay: rgba(0, 0, 0, 0.75);
  --bg-overlay-light: rgba(0, 0, 0, 0.6);
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-focus: rgba(255, 111, 97, 0.5);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --header-height: 80px;
}

/* ==================== Reset & Base ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==================== Loading Screen ==================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition:
    opacity 0.5s,
    visibility 0.5s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================== Container ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== Header ==================== */
header {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 40px;
  height: var(--header-height);
  background: rgba(21, 85, 21, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  transition:
    transform 0.4s,
    opacity 0.4s,
    background 0.3s;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

header.scrolled {
  background: rgba(21, 85, 21, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

header.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

header .logo {
  z-index: 1001;
}

header .logo img {
  height: 50px;
  transition: transform var(--transition-medium);
}

header .logo img:hover {
  transform: scale(1.05);
}

header nav.center-nav {
  display: flex;
  gap: 30px;
}

header nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
  transition: color var(--transition-fast);
  padding: 5px 0;
}

header nav a:hover {
  color: var(--primary-color);
}

header .social-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

header .social-icons a {
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
}

header .social-icons a:hover {
  color: var(--primary-color);
  background: rgba(255, 111, 97, 0.1);
  transform: translateY(-3px);
}

/* ==================== Mobile Menu Toggle ==================== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-medium);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

/* ==================== Mobile Menu Overlay ==================== */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(21, 85, 21, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-slow),
    visibility var(--transition-slow);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.mobile-nav-link {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  transition: all var(--transition-medium);
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu-overlay.active .mobile-nav-link {
  animation: slideInDown 0.5s forwards;
}

.mobile-nav-link:nth-child(1) {
  animation-delay: 0.1s;
}
.mobile-nav-link:nth-child(2) {
  animation-delay: 0.2s;
}
.mobile-nav-link:nth-child(3) {
  animation-delay: 0.3s;
}
.mobile-nav-link:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-link:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.mobile-social {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu-overlay.active .mobile-social {
  animation: slideInDown 0.5s 0.5s forwards;
}

.mobile-social a {
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: all var(--transition-medium);
}

.mobile-social a:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* ==================== Hero Section ==================== */
#hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.hero-video-wrapper {
  width: 90%;
  max-width: 1100px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border-radius: 15px;
  overflow: hidden;
}

#hero video {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 60px 40px;
  text-align: center;
}

.hero-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.5 rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-secondary);
  text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.8);
}

/* Fade In Animations */
.fade-in {
  opacity: 0;
  animation: fadeIn 1.5s 0.5s forwards;
}

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 1.5s 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ==================== Card Structure ==================== */
.content-card {
  background: var(--bg-overlay);
  padding: 50px 40px;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
  transition: all var(--transition-medium);
}

.content-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.narrow-card {
  max-width: 800px;
}

/* ==================== Long Background Image ==================== */
.long-bg-image {
  background-image: url("../Assets/logo_dungeon_pits.png");
  background-size: 40%;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  padding: 100px 0;
  text-align: center;
  position: relative;
}

.long-bg-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* ==================== Games Section ==================== */
.games-content-card {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: var(--bg-overlay);
  padding: 40px;
  border-radius: 20px;
  text-align: left;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-medium);
}

.games-content-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.game-video {
  flex: 1.2;
}

.game-video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.game-info {
  flex: 1;
  padding-top: 10px;
}

.game-info h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 2.5rem;
  margin: 0 0 20px 0;
  color: var(--primary-color);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.game-info p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.game-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.game-btn {
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-medium);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
}

.primary-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 111, 97, 0.4);
}

.secondary-btn {
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  background: transparent;
}

.secondary-btn:hover {
  background: var(--text-primary);
  color: var(--bg-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* ==================== About Section ==================== */
#about h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 2.8rem;
  margin-bottom: 25px;
  color: var(--primary-color);
  font-weight: 800;
}

#about p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.team-stats {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  font-family: "Montserrat", sans-serif;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================== Contact Section ==================== */
#contact h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  font-weight: 800;
}

#contact > .container > .content-card > p {
  margin-bottom: 30px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ==================== Contact Form ==================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 650px;
  margin: 0 auto;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 20px;
  width: 100%;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: all var(--transition-medium);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px var(--border-color-focus);
}

.contact-form input.error,
.contact-form textarea.error {
  border-color: #ff4444;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.error-message {
  color: #ff4444;
  font-size: 0.85rem;
  display: none;
}

.error-message.show {
  display: block;
}

.submit-btn {
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  padding: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition-medium);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn-loading {
  display: none;
}

.submit-btn.loading .btn-text {
  display: none;
}

.submit-btn.loading .btn-loading {
  display: inline-block;
}

.submit-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 111, 97, 0.4);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Success Message */
.form-success {
  display: none;
  background: rgba(76, 175, 80, 0.2);
  border: 2px solid #4caf50;
  color: #4caf50;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-top: 20px;
  animation: slideDown 0.5s ease;
}

.form-success.show {
  display: block;
}

.form-success i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.form-success p {
  margin: 0;
  font-size: 1.05rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== Footer ==================== */
footer {
  background: var(--secondary-dark);
  padding: 60px 0 20px;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 15px;
}

.footer-logo p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links h3,
.footer-social h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
  color: var(--primary-color);
  background: rgba(255, 111, 97, 0.2);
  transform: translateY(-5px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-legal {
  display: flex;
  gap: 15px;
  align-items: center;
}

.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--primary-color);
}

.footer-legal span {
  color: var(--text-secondary);
}

/* ==================== Scroll to Top Button ==================== */
#scrollTopBtn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  background: var(--primary-color);
  color: var(--text-primary);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 100;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-sm);
  font-size: 1.2rem;
}

#scrollTopBtn:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 111, 97, 0.4);
}

#scrollTopBtn.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceIn 0.5s;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==================== Cookie Banner ==================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--secondary-color);
  padding: 20px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
  z-index: 999;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-content p {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  font-size: 0.95rem;
}

.accept-btn {
  background: var(--primary-color);
  color: var(--text-primary);
}

.accept-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.decline-btn {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
}

.decline-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==================== Scroll Animations ==================== */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  header {
    padding: 0 25px;
  }

  header nav.center-nav {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  header .social-icons {
    display: none;
  }

  .games-content-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
  }

  .game-info h2 {
    font-size: 2rem;
  }

  .game-buttons {
    justify-content: center;
  }

  .long-bg-image {
    background-size: 60%;
    padding: 80px 0;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .team-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  header {
    padding: 0 20px;
    height: 60px;
  }

  header .logo img {
    height: 40px;
  }

  .form-row {
    flex-direction: column;
  }

  .game-info h2 {
    font-size: 1.8rem;
  }

  .content-card {
    padding: 30px 20px;
  }

  .hero-video-wrapper {
    width: 95%;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  #scrollTopBtn {
    width: 45px;
    height: 45px;
    right: 20px;
    bottom: 20px;
  }

  .long-bg-image {
    background-size: 80%;
    padding: 60px 0;
  }

  #about h2,
  #contact h2 {
    font-size: 2.2rem;
  }

  .mobile-nav-link {
    font-size: 1.5rem;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }
}

/* ==================== Accessibility ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
a:focus,
button:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ==================== Print Styles ==================== */
@media print {
  header,
  footer,
  #scrollTopBtn,
  .cookie-banner,
  .mobile-menu-toggle {
    display: none !important;
  }
}
.skip-link {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
