/* JL9 Website - Main Stylesheet
   All classes use 'g14d-' prefix for namespace isolation
   Color palette: #1A1A2E | #9400D3 | #8B008B | #8470FF
*/

/* Reset and 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: #f0f0f0;
  background-color: #1A1A2E;
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* CSS Variables */
:root {
  --g14d-primary: #9400D3;
  --g14d-secondary: #8B008B;
  --g14d-accent: #8470FF;
  --g14d-bg-dark: #1A1A2E;
  --g14d-bg-card: #252547;
  --g14d-text: #f0f0f0;
  --g14d-text-muted: #a0a0b0;
  --g14d-border: #353565;
}

/* Container */
.g14d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.g14d-wrapper {
  padding-bottom: 8rem;
}

/* Header */
.g14d-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--g14d-bg-dark) 0%, #2a2a4e 100%);
  border-bottom: 2px solid var(--g14d-primary);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(148, 0, 211, 0.3);
}

.g14d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  height: 6rem;
}

.g14d-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--g14d-text);
}

.g14d-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 8px;
}

.g14d-logo-text {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--g14d-primary) 0%, var(--g14d-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.g14d-header-actions {
  display: flex;
  gap: 0.8rem;
}

.g14d-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-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 3.8rem;
}

.g14d-btn-primary {
  background: linear-gradient(135deg, var(--g14d-primary) 0%, var(--g14d-secondary) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(148, 0, 211, 0.4);
}

.g14d-btn-secondary {
  background: transparent;
  color: var(--g14d-text);
  border: 2px solid var(--g14d-accent);
}

.g14d-btn:hover,
.g14d-btn:active {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(148, 0, 211, 0.6);
}

.g14d-btn.g14d-touch-active {
  transform: scale(0.95);
}

/* Mobile Menu */
.g14d-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.g14d-menu-toggle span {
  display: block;
  width: 2.5rem;
  height: 0.3rem;
  background: var(--g14d-accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.g14d-mobile-menu {
  position: fixed;
  top: 6rem;
  left: 0;
  width: 100%;
  height: calc(100vh - 6rem);
  background: var(--g14d-bg-dark);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.g14d-mobile-menu.g14d-menu-open {
  transform: translateX(0);
}

.g14d-menu-list {
  list-style: none;
}

.g14d-menu-list li {
  margin-bottom: 0.5rem;
}

.g14d-menu-link {
  display: block;
  padding: 1rem;
  color: var(--g14d-text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.g14d-menu-link:hover {
  background: var(--g14d-bg-card);
  color: var(--g14d-accent);
}

/* Hero Section */
.g14d-hero {
  margin-top: 6rem;
}

.g14d-slider {
  position: relative;
  width: 100%;
  height: 18rem;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.g14d-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section */
.g14d-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--g14d-bg-card);
  border-radius: 12px;
}

.g14d-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--g14d-accent);
  text-align: center;
}

/* Game Grid */
.g14d-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.g14d-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.g14d-game-item:hover {
  transform: scale(1.08);
}

.g14d-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.g14d-game-name {
  font-size: 1rem;
  text-align: center;
  color: var(--g14d-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Card */
.g14d-card {
  background: var(--g14d-bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid var(--g14d-border);
}

.g14d-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--g14d-accent);
}

.g14d-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g14d-text);
}

/* Link */
.g14d-link {
  color: var(--g14d-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.g14d-link:hover {
  color: var(--g14d-primary);
  text-decoration: underline;
}

/* Footer */
.g14d-footer {
  background: var(--g14d-bg-dark);
  padding: 2rem 1rem 8rem;
  border-top: 2px solid var(--g14d-border);
  margin-top: 3rem;
}

.g14d-footer-content {
  text-align: center;
  margin-bottom: 2rem;
}

.g14d-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.g14d-footer-link {
  color: var(--g14d-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.g14d-footer-link:hover {
  color: var(--g14d-accent);
}

.g14d-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.g14d-partner-logo {
  height: 3rem;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.g14d-partner-logo:hover {
  opacity: 1;
}

.g14d-copyright {
  text-align: center;
  color: var(--g14d-text-muted);
  font-size: 1.2rem;
}

/* Bottom Navigation */
.g14d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 6.4rem;
  background: linear-gradient(180deg, var(--g14d-bg-dark) 0%, #2a2a4e 100%);
  border-top: 2px solid var(--g14d-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(148, 0, 211, 0.3);
}

.g14d-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 6rem;
  min-height: 6rem;
  text-decoration: none;
  color: var(--g14d-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.g14d-nav-item:hover,
.g14d-nav-item:active {
  color: var(--g14d-accent);
  transform: scale(1.1);
}

.g14d-nav-item.active {
  color: var(--g14d-primary);
}

.g14d-nav-icon {
  font-size: 2.4rem;
}

.g14d-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .g14d-bottom-nav {
    display: none;
  }

  .g14d-wrapper {
    padding-bottom: 2rem;
  }
}

/* Desktop navigation (hidden on mobile) */
.g14d-desktop-nav {
  display: none;
}

@media (min-width: 769px) {
  .g14d-desktop-nav {
    display: flex;
    gap: 1rem;
  }
}

/* Utility Classes */
.g14d-text-center {
  text-align: center;
}

.g14d-mt-1 {
  margin-top: 1rem;
}

.g14d-mt-2 {
  margin-top: 2rem;
}

.g14d-mb-1 {
  margin-bottom: 1rem;
}

.g14d-mb-2 {
  margin-bottom: 2rem;
}

.g14d-text-gradient {
  background: linear-gradient(135deg, var(--g14d-primary) 0%, var(--g14d-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animation */
@keyframes g14d-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.g14d-fade-in {
  animation: g14d-fadeIn 0.5s ease forwards;
}
