/* Layout Stylesheet - Warm Indian Red Theme - w5404 Prefix */

:root {
  --w5404-primary: #CD5C5C;
  --w5404-dark-bg: #141414;
  --w5404-light-text: #F0F0F0;
  --w5404-light-bg: #FFEFD5;
  --w5404-wheat: #F5DEB3;
  --w5404-brown: #8B4513;
  --w5404-text-primary: #F0F0F0;
  --w5404-text-secondary: #B0B0B0;
  --w5404-border: #333333;
  --w5404-hover: #FF7F7F;
  --w5404-shadow: rgba(205, 92, 92, 0.2);
  --w5404-base-font: 62.5%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--w5404-base-font);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--w5404-dark-bg);
  color: var(--w5404-text-primary);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* HEADER STYLES */
.w5404-header {
  background: linear-gradient(135deg, var(--w5404-brown) 0%, var(--w5404-dark-bg) 100%);
  padding: 1rem 1.2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px var(--w5404-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.w5404-header-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--w5404-light-bg);
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
}

.w5404-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  background: var(--w5404-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.w5404-header-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.w5404-header-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.w5404-btn-register {
  background-color: var(--w5404-primary);
  color: var(--w5404-light-text);
  border: 2px solid var(--w5404-primary);
}

.w5404-btn-register:hover,
.w5404-btn-register:active {
  background-color: var(--w5404-hover);
  border-color: var(--w5404-hover);
  transform: scale(1.05);
}

.w5404-btn-login {
  background-color: transparent;
  color: var(--w5404-primary);
  border: 2px solid var(--w5404-primary);
}

.w5404-btn-login:hover,
.w5404-btn-login:active {
  background-color: var(--w5404-primary);
  color: var(--w5404-light-text);
  transform: scale(1.05);
}

.w5404-menu-toggle {
  background: none;
  border: none;
  color: var(--w5404-primary);
  font-size: 2.4rem;
  cursor: pointer;
  display: none;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.w5404-menu-toggle:hover {
  color: var(--w5404-hover);
}

/* NAVIGATION MENU */
.w5404-nav {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.w5404-nav-item {
  position: relative;
}

.w5404-nav-link {
  color: var(--w5404-text-primary);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.w5404-nav-link:hover,
.w5404-nav-link.w5404-active {
  color: var(--w5404-primary);
  background-color: rgba(205, 92, 92, 0.1);
}

/* MAIN CONTENT */
main {
  margin-top: 7rem;
  padding: 2rem 1.2rem;
  max-width: 100%;
}

@media (max-width: 768px) {
  main {
    padding-bottom: 8rem;
  }
}

.w5404-container {
  max-width: 100%;
  margin: 0 auto;
}

.w5404-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.w5404-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.2rem;
}

/* CAROUSEL STYLES */
.w5404-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px var(--w5404-shadow);
  margin-bottom: 2rem;
}

.w5404-carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.w5404-carousel-item {
  position: absolute;
  width: 100%;
  height: 0;
  padding-bottom: 50%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.w5404-carousel-item.w5404-active {
  opacity: 1;
  position: relative;
  height: auto;
  padding-bottom: 0;
}

.w5404-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.w5404-carousel-controls {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 10;
}

.w5404-carousel-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.w5404-carousel-dot.w5404-active {
  background-color: var(--w5404-primary);
  width: 2.4rem;
  border-radius: 0.5rem;
}

/* SECTION STYLES */
.w5404-section {
  margin-bottom: 3rem;
  background: rgba(139, 69, 19, 0.05);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--w5404-primary);
}

.w5404-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--w5404-light-bg);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.w5404-section-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--w5404-wheat);
}

/* GAME GRID */
.w5404-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.w5404-game-card {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  text-align: center;
}

.w5404-game-card:hover {
  transform: translateY(-4px);
}

.w5404-game-card-image {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--w5404-primary);
  margin-bottom: 0.6rem;
  transition: all 0.3s ease;
}

.w5404-game-card:hover .w5404-game-card-image {
  border-color: var(--w5404-hover);
  box-shadow: 0 4px 12px var(--w5404-shadow);
}

.w5404-game-card-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--w5404-light-bg);
  word-wrap: break-word;
  line-height: 1.3;
}

/* BUTTON STYLES */
.w5404-btn {
  display: inline-block;
  padding: 1rem 1.8rem;
  background-color: var(--w5404-primary);
  color: var(--w5404-light-text);
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.w5404-btn:hover {
  background-color: var(--w5404-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 16px var(--w5404-shadow);
}

.w5404-btn-secondary {
  background-color: var(--w5404-brown);
}

.w5404-btn-secondary:hover {
  background-color: #A0551A;
}

.w5404-btn-outline {
  background-color: transparent;
  border: 2px solid var(--w5404-primary);
  color: var(--w5404-primary);
}

.w5404-btn-outline:hover {
  background-color: var(--w5404-primary);
  color: var(--w5404-light-text);
}

/* TEXT STYLES */
.w5404-text-primary {
  color: var(--w5404-primary);
}

.w5404-text-light {
  color: var(--w5404-light-bg);
}

.w5404-text-secondary {
  color: var(--w5404-text-secondary);
}

/* LINK STYLES */
a {
  color: var(--w5404-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

a:hover {
  color: var(--w5404-hover);
  text-decoration: underline;
}

/* MOBILE BOTTOM NAVIGATION */
.w5404-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--w5404-dark-bg), rgba(20, 20, 20, 0.95));
  border-top: 3px solid var(--w5404-primary);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  height: 6.4rem;
  padding: 0.6rem 0;
  z-index: 1000;
  box-shadow: 0 -4px 12px var(--w5404-shadow);
}

.w5404-mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem;
  min-width: 5rem;
  min-height: 5.5rem;
  background: none;
  border: none;
  color: var(--w5404-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  border-radius: 8px;
}

.w5404-mobile-nav-btn:hover,
.w5404-mobile-nav-btn.w5404-active {
  color: var(--w5404-primary);
  background-color: rgba(205, 92, 92, 0.1);
  transform: translateY(-2px);
}

.w5404-mobile-nav-icon {
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w5404-mobile-nav-label {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* MOBILE MENU */
.w5404-mobile-menu {
  display: none;
  position: fixed;
  top: 7rem;
  left: 0;
  right: 0;
  background: var(--w5404-dark-bg);
  border: 1px solid var(--w5404-border);
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  z-index: 999;
}

.w5404-mobile-menu.w5404-menu-active {
  display: block;
}

.w5404-menu-item {
  border-bottom: 1px solid var(--w5404-border);
}

.w5404-menu-item a {
  display: block;
  padding: 1.2rem 1.5rem;
  color: var(--w5404-text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.w5404-menu-item a:hover {
  background-color: rgba(205, 92, 92, 0.1);
  color: var(--w5404-primary);
  padding-left: 2rem;
}

/* FOOTER */
.w5404-footer {
  background: linear-gradient(135deg, var(--w5404-dark-bg) 0%, var(--w5404-brown) 100%);
  border-top: 3px solid var(--w5404-primary);
  padding: 2.5rem 1.2rem;
  margin-top: 3rem;
  color: var(--w5404-text-primary);
}

.w5404-footer-content {
  max-width: 100%;
  margin: 0 auto;
}

.w5404-footer-section {
  margin-bottom: 2rem;
}

.w5404-footer-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--w5404-light-bg);
}

.w5404-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.w5404-footer-link {
  color: var(--w5404-primary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.w5404-footer-link:hover {
  color: var(--w5404-hover);
  text-decoration: underline;
}

.w5404-footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--w5404-border);
  border-bottom: 1px solid var(--w5404-border);
  margin-bottom: 1.5rem;
}

.w5404-partner-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.w5404-partner-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.w5404-footer-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--w5404-text-secondary);
}

/* MOBILE STYLES */
@media (max-width: 768px) {
  :root {
    --w5404-base-font: 62.5%;
  }

  .w5404-header {
    padding: 0.8rem 1rem;
  }

  .w5404-header-logo {
    gap: 0.6rem;
    font-size: 1.6rem;
  }

  .w5404-logo-icon {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.6rem;
  }

  .w5404-header-buttons {
    gap: 0.4rem;
  }

  .w5404-header-btn {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
  }

  .w5404-nav {
    display: none;
  }

  .w5404-menu-toggle {
    display: block;
  }

  main {
    margin-top: 7rem;
    padding: 1.5rem 1rem;
  }

  .w5404-section {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  .w5404-section-title {
    font-size: 1.8rem;
  }

  .w5404-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.8rem;
  }

  .w5404-game-card-image {
    height: 9rem;
    margin-bottom: 0.5rem;
  }

  .w5404-game-card-name {
    font-size: 1.1rem;
  }

  .w5404-mobile-nav {
    height: 7rem;
    padding: 0.8rem 0;
  }

  .w5404-mobile-nav-btn {
    min-width: 5.5rem;
    min-height: 5.5rem;
    font-size: 0.95rem;
  }

  .w5404-mobile-nav-icon {
    font-size: 2.2rem;
  }

  .w5404-footer {
    padding: 2rem 1rem;
  }

  .w5404-footer-partners {
    gap: 0.8rem;
    padding: 1rem 0;
  }

  .w5404-partner-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* DESKTOP STYLES */
@media (min-width: 769px) {
  .w5404-mobile-nav {
    display: none;
  }

  .w5404-menu-toggle {
    display: none;
  }

  .w5404-mobile-menu {
    display: none !important;
  }

  main {
    padding-bottom: 2rem;
  }

  .w5404-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  }

  .w5404-header {
    padding: 1.2rem 2rem;
  }

  .w5404-nav {
    display: flex;
  }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* PRINT STYLES */
@media print {
  .w5404-header,
  .w5404-mobile-nav,
  .w5404-footer {
    display: none;
  }

  main {
    margin-top: 0;
  }
}
