/**
 * LegendLink PH - Theme Styles
 * All classes use wfc40 prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --wfc40-primary: #FFD700;
  --wfc40-primary-dark: #E6C200;
  --wfc40-bg-dark: #1A1A1A;
  --wfc40-bg-darker: #0F0F0F;
  --wfc40-bg-light: #2A2A2A;
  --wfc40-text: #FFFFFF;
  --wfc40-text-muted: #B8B8B8;
  --wfc40-border: #3A3A3A;
  --wfc40-shadow: rgba(0, 0, 0, 0.5);
  --wfc40-gradient: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--wfc40-text);
  background-color: var(--wfc40-bg-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.wfc40-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.wfc40-wrapper {
  padding-top: 6rem;
  padding-bottom: 8rem;
}

@media (min-width: 769px) {
  .wfc40-wrapper {
    padding-bottom: 2rem;
  }
}

/* Header */
.wfc40-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--wfc40-bg-darker);
  border-bottom: 1px solid var(--wfc40-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.wfc40-header-scrolled {
  box-shadow: 0 2px 10px var(--wfc40-shadow);
}

.wfc40-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5.6rem;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.wfc40-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--wfc40-text);
  font-size: 1.6rem;
  font-weight: 700;
}

.wfc40-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.6rem;
}

.wfc40-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.wfc40-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 0.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
}

.wfc40-btn-primary {
  background: var(--wfc40-gradient);
  color: var(--wfc40-bg-dark);
}

.wfc40-btn-primary:hover,
.wfc40-btn-primary:active {
  transform: translateY(-0.2rem);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.wfc40-btn-secondary {
  background-color: transparent;
  color: var(--wfc40-primary);
  border: 2px solid var(--wfc40-primary);
}

.wfc40-btn-secondary:hover,
.wfc40-btn-secondary:active {
  background-color: var(--wfc40-primary);
  color: var(--wfc40-bg-dark);
}

.wfc40-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.wfc40-menu-toggle span {
  display: block;
  width: 2.4rem;
  height: 0.2rem;
  background-color: var(--wfc40-primary);
  transition: all 0.3s ease;
}

@media (min-width: 769px) {
  .wfc40-menu-toggle {
    display: none;
  }
}

/* Mobile Menu */
.wfc40-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.wfc40-overlay-show {
  opacity: 1;
  visibility: visible;
}

.wfc40-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 32rem;
  height: 100%;
  background-color: var(--wfc40-bg-darker);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.wfc40-menu-open {
  right: 0;
}

.wfc40-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--wfc40-border);
}

.wfc40-menu-close {
  background: none;
  border: none;
  color: var(--wfc40-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

.wfc40-menu-nav {
  padding: 1rem 0;
}

.wfc40-menu-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--wfc40-text);
  text-decoration: none;
  font-size: 1.4rem;
  transition: all 0.2s ease;
  border-left: 0.3rem solid transparent;
}

.wfc40-menu-nav a:hover,
.wfc40-menu-nav a:active {
  background-color: var(--wfc40-bg-light);
  border-left-color: var(--wfc40-primary);
  color: var(--wfc40-primary);
}

/* Carousel */
.wfc40-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.wfc40-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.wfc40-carousel-slide {
  flex: 0 0 100%;
  position: relative;
}

.wfc40-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Grid */
.wfc40-grid {
  display: grid;
  gap: 1rem;
}

.wfc40-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wfc40-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wfc40-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Card */
.wfc40-card {
  background-color: var(--wfc40-bg-light);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--wfc40-border);
}

.wfc40-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--wfc40-primary);
  margin-bottom: 1rem;
}

.wfc40-card-content {
  color: var(--wfc40-text-muted);
  line-height: 1.6;
}

/* Game Grid */
.wfc40-game-item {
  display: block;
  text-decoration: none;
  color: var(--wfc40-text);
  transition: all 0.3s ease;
}

.wfc40-game-item:hover,
.wfc40-game-item:active {
  transform: translateY(-0.4rem);
}

.wfc40-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.8rem;
  margin-bottom: 0.6rem;
  background-color: var(--wfc40-bg-darker);
}

.wfc40-game-name {
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wfc40-text);
}

.wfc40-game-item:hover .wfc40-game-name {
  color: var(--wfc40-primary);
}

/* Section */
.wfc40-section {
  margin-bottom: 3rem;
}

.wfc40-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wfc40-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.wfc40-section-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--wfc40-text);
  margin-bottom: 1rem;
}

/* Text Elements */
.wfc40-h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--wfc40-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.3;
}

.wfc40-h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wfc40-primary);
  margin-bottom: 1.2rem;
  margin-top: 2rem;
}

.wfc40-h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--wfc40-text);
  margin-bottom: 1rem;
}

.wfc40-p {
  margin-bottom: 1rem;
  color: var(--wfc40-text-muted);
  line-height: 1.6;
}

.wfc40-link {
  color: var(--wfc40-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.wfc40-link:hover,
.wfc40-link:active {
  text-decoration: underline;
}

/* List */
.wfc40-list {
  list-style: none;
  padding-left: 0;
}

.wfc40-list li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.8rem;
  color: var(--wfc40-text-muted);
}

.wfc40-list li:before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--wfc40-primary);
  font-weight: bold;
}

/* Footer */
.wfc40-footer {
  background-color: var(--wfc40-bg-darker);
  border-top: 1px solid var(--wfc40-border);
  padding: 2rem 0;
  margin-top: 3rem;
}

.wfc40-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.wfc40-footer-link {
  color: var(--wfc40-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.wfc40-footer-link:hover {
  color: var(--wfc40-primary);
}

.wfc40-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.wfc40-partner-img {
  height: 2.5rem;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.wfc40-partner-img:hover {
  opacity: 1;
}

.wfc40-copyright {
  text-align: center;
  color: var(--wfc40-text-muted);
  font-size: 1.2rem;
}

/* Bottom Navigation */
.wfc40-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--wfc40-bg-darker);
  border-top: 2px solid var(--wfc40-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 6rem;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--wfc40-shadow);
}

.wfc40-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 6rem;
  min-height: 6rem;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: var(--wfc40-text-muted);
  transition: all 0.3s ease;
  padding: 0.5rem;
}

.wfc40-bottom-nav-item i,
.wfc40-bottom-nav-item svg {
  font-size: 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
}

.wfc40-bottom-nav-item span {
  font-size: 1rem;
  font-weight: 500;
}

.wfc40-bottom-nav-item:hover,
.wfc40-bottom-nav-item:active {
  color: var(--wfc40-primary);
  transform: scale(1.1);
}

.wfc40-bottom-nav-item.wfc40-active {
  color: var(--wfc40-primary);
}

@media (min-width: 769px) {
  .wfc40-bottom-nav {
    display: none;
  }

  .wfc40-wrapper {
    padding-bottom: 2rem;
  }
}

/* Utility Classes */
.wfc40-text-center {
  text-align: center;
}

.wfc40-mt-1 { margin-top: 1rem; }
.wfc40-mt-2 { margin-top: 2rem; }
.wfc40-mt-3 { margin-top: 3rem; }

.wfc40-mb-1 { margin-bottom: 1rem; }
.wfc40-mb-2 { margin-bottom: 2rem; }
.wfc40-mb-3 { margin-bottom: 3rem; }

.wfc40-p-1 { padding: 1rem; }
.wfc40-p-2 { padding: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .wfc40-container {
    max-width: 100%;
  }

  main {
    padding-bottom: 8rem;
  }
}
