/**
 * JLJL55 Core Stylesheet - Mobile-first responsive design
 * All classes use 'vffe-' prefix to avoid conflicts
 */

/* CSS Variables for consistent theming */
:root {
  --vffe-primary: #5D5D5D;
  --vffe-secondary: #2C2C2C;
  --vffe-accent: #3C3C3C;
  --vffe-highlight: #BAE1FF;
  --vffe-text: #D3D3D3;
  --vffe-bg-dark: #1a1a1a;
  --vffe-bg-card: #252525;
  --vffe-border: #404040;
  --vffe-gradient: linear-gradient(135deg, #5D5D5D 0%, #3C3C3C 100%);
  --vffe-header-height: 60px;
  --vffe-bottom-nav-height: 60px;
}

/* 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, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--vffe-text);
  background-color: var(--vffe-bg-dark);
  overflow-x: hidden;
}

/* Container and Layout */
.vffe-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.vffe-wrapper {
  min-height: 100vh;
  padding-bottom: 80px;
}

.vffe-grid {
  display: grid;
  gap: 1rem;
}

.vffe-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.vffe-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.vffe-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Header Styles */
.vffe-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--vffe-header-height);
  background: var(--vffe-secondary);
  border-bottom: 1px solid var(--vffe-border);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.vffe-header.vffe-header-hidden {
  transform: translateY(-100%);
}

.vffe-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.vffe-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--vffe-highlight);
  font-size: 1.8rem;
  font-weight: bold;
}

.vffe-logo img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.vffe-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.vffe-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.vffe-btn-primary {
  background: var(--vffe-highlight);
  color: var(--vffe-secondary);
}

.vffe-btn-secondary {
  background: transparent;
  color: var(--vffe-highlight);
  border: 1px solid var(--vffe-highlight);
}

.vffe-btn:hover,
.vffe-btn:active {
  transform: scale(1.05);
  opacity: 0.9;
}

.vffe-btn-clicked {
  transform: scale(0.95);
}

/* Mobile Menu */
.vffe-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.vffe-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--vffe-highlight);
  transition: all 0.3s ease;
}

.vffe-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.vffe-menu-overlay.vffe-overlay-active {
  opacity: 1;
  visibility: visible;
}

.vffe-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--vffe-secondary);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem 0;
}

.vffe-mobile-menu.vffe-menu-active {
  right: 0;
}

.vffe-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--vffe-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.vffe-menu-items {
  list-style: none;
  padding: 0;
}

.vffe-menu-item {
  border-bottom: 1px solid var(--vffe-border);
}

.vffe-menu-link {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--vffe-text);
  text-decoration: none;
  transition: background 0.2s ease;
}

.vffe-menu-link:hover {
  background: var(--vffe-accent);
}

/* Carousel */
.vffe-carousel {
  position: relative;
  margin-top: var(--vffe-header-height);
  overflow: hidden;
}

.vffe-carousel-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.vffe-carousel-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.vffe-carousel-slide.vffe-slide-active {
  opacity: 1;
}

.vffe-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Game Grid */
.vffe-section {
  margin: 2rem 0;
}

.vffe-section-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--vffe-highlight);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vffe-section-title i {
  font-size: 1.8rem;
}

.vffe-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.vffe-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--vffe-text);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.vffe-game-item:hover {
  transform: scale(1.05);
}

.vffe-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--vffe-bg-card);
  margin-bottom: 0.4rem;
}

.vffe-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vffe-game-name {
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cards */
.vffe-card {
  background: var(--vffe-bg-card);
  border: 1px solid var(--vffe-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.vffe-card-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--vffe-highlight);
  margin-bottom: 1rem;
}

.vffe-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
}

/* Typography */
h1 {
  font-size: 2.4rem;
  font-weight: bold;
  color: var(--vffe-highlight);
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  color: var(--vffe-highlight);
  margin: 1.5rem 0 1rem;
}

h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--vffe-text);
  margin: 1rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--vffe-highlight);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* Lists */
.vffe-list {
  list-style: none;
  padding: 0;
}

.vffe-list-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--vffe-border);
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.vffe-list-item:last-child {
  border-bottom: none;
}

.vffe-list-icon {
  color: var(--vffe-highlight);
  font-size: 1.4rem;
  margin-top: 0.2rem;
}

/* Bottom Navigation */
.vffe-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--vffe-bottom-nav-height);
  background: var(--vffe-secondary);
  border-top: 1px solid var(--vffe-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 0.5rem;
}

.vffe-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--vffe-text);
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
}

.vffe-nav-btn:hover,
.vffe-nav-btn:active {
  background: var(--vffe-accent);
  transform: scale(1.1);
}

.vffe-nav-btn.vffe-nav-active {
  color: var(--vffe-highlight);
}

.vffe-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.vffe-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Footer */
.vffe-footer {
  background: var(--vffe-secondary);
  border-top: 1px solid var(--vffe-border);
  padding: 2rem 0 8rem;
  margin-top: 3rem;
}

.vffe-footer-section {
  margin-bottom: 2rem;
}

.vffe-footer-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--vffe-highlight);
  margin-bottom: 1rem;
}

.vffe-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.vffe-footer-link {
  color: var(--vffe-text);
  font-size: 1.2rem;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  background: var(--vffe-bg-card);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.vffe-footer-link:hover {
  background: var(--vffe-accent);
}

.vffe-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.vffe-partner-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.vffe-partner-logo:hover {
  opacity: 1;
}

.vffe-copyright {
  text-align: center;
  color: var(--vffe-text);
  font-size: 1.2rem;
  padding: 1rem;
  border-top: 1px solid var(--vffe-border);
}

/* Utility Classes */
.vffe-text-center {
  text-align: center;
}

.vffe-text-highlight {
  color: var(--vffe-highlight);
  font-weight: 600;
}

.vffe-mt-1 { margin-top: 1rem; }
.vffe-mt-2 { margin-top: 2rem; }
.vffe-mb-1 { margin-bottom: 1rem; }
.vffe-mb-2 { margin-bottom: 2rem; }

/* Desktop Styles */
@media (min-width: 769px) {
  .vffe-bottom-nav {
    display: none;
  }

  .vffe-wrapper {
    padding-bottom: 2rem;
  }

  .vffe-menu-toggle {
    display: none;
  }
}

/* Touch-friendly adjustments */
@media (max-width: 768px) {
  .vffe-btn,
  .vffe-nav-btn,
  .vffe-game-item {
    min-height: 44px;
  }
}
