/* 777ph.biz CSS Design System */
/* All classes use prefix "v2f3-" for namespace isolation */

/* CSS Variables - Color Palette */
:root {
  --v2f3-primary: #778899;
  --v2f3-secondary: #FF8C00;
  --v2f3-accent: #FFD700;
  --v2f3-dark: #0C0C0C;
  --v2f3-light: #F5F5F5;
  --v2f3-gray: #C0C0C0;
  --v2f3-white: #FFFFFF;
  --v2f3-black: #000000;
  --v2f3-success: #28a745;
  --v2f3-warning: #ffc107;
  --v2f3-error: #dc3545;
  --v2f3-info: #17a2b8;

  /* Typography */
  --v2f3-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --v2f3-font-mono: 'Fira Code', 'Courier New', monospace;

  /* Spacing */
  --v2f3-spacing-xs: 0.25rem;
  --v2f3-spacing-sm: 0.5rem;
  --v2f3-spacing-md: 1rem;
  --v2f3-spacing-lg: 1.5rem;
  --v2f3-spacing-xl: 2rem;
  --v2f3-spacing-xxl: 3rem;

  /* Border Radius */
  --v2f3-radius-sm: 0.25rem;
  --v2f3-radius-md: 0.5rem;
  --v2f3-radius-lg: 1rem;
  --v2f3-radius-xl: 1.5rem;

  /* Shadows */
  --v2f3-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --v2f3-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --v2f3-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --v2f3-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --v2f3-transition-fast: 0.15s ease;
  --v2f3-transition-normal: 0.3s ease;
  --v2f3-transition-slow: 0.5s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* Base font size for rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: var(--v2f3-font-primary);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--v2f3-light);
  background-color: var(--v2f3-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.v2f3-h1, .v2f3-h2, .v2f3-h3, .v2f3-h4, .v2f3-h5, .v2f3-h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--v2f3-spacing-md);
}

.v2f3-h1 { font-size: 3.2rem; }
.v2f3-h2 { font-size: 2.8rem; }
.v2f3-h3 { font-size: 2.4rem; }
.v2f3-h4 { font-size: 2rem; }
.v2f3-h5 { font-size: 1.8rem; }
.v2f3-h6 { font-size: 1.6rem; }

.v2f3-text-sm { font-size: 1.2rem; }
.v2f3-text-md { font-size: 1.6rem; }
.v2f3-text-lg { font-size: 2rem; }
.v2f3-text-xl { font-size: 2.4rem; }

.v2f3-text-center { text-align: center; }
.v2f3-text-left { text-align: left; }
.v2f3-text-right { text-align: right; }

/* Layout Containers */
.v2f3-container {
  width: 100%;
  max-width: 430px; /* Mobile-first constraint */
  margin: 0 auto;
  padding: 0 var(--v2f3-spacing-md);
}

.v2f3-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.v2f3-main {
  flex: 1;
  padding-top: 7rem; /* Account for fixed header */
  padding-bottom: 8rem; /* Account for fixed bottom nav */
}

.v2f3-grid {
  display: grid;
  gap: var(--v2f3-spacing-md);
}

.v2f3-flex {
  display: flex;
}

.v2f3-flex-col {
  flex-direction: column;
}

.v2f3-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2f3-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Navigation */
.v2f3-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--v2f3-dark) 0%, var(--v2f3-primary) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.v2f3-nav {
  padding: var(--v2f3-spacing-sm) var(--v2f3-spacing-md);
}

.v2f3-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--v2f3-spacing-sm);
  text-decoration: none;
  color: var(--v2f3-white);
  font-weight: 700;
  font-size: 2rem;
}

.v2f3-nav-brand img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--v2f3-radius-md);
}

.v2f3-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--v2f3-spacing-sm);
}

.v2f3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--v2f3-spacing-sm) var(--v2f3-spacing-md);
  border: none;
  border-radius: var(--v2f3-radius-md);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--v2f3-transition-fast);
  min-height: 4.4rem; /* Touch-friendly minimum */
  white-space: nowrap;
}

.v2f3-btn-primary {
  background: linear-gradient(135deg, var(--v2f3-secondary) 0%, var(--v2f3-accent) 100%);
  color: var(--v2f3-white);
  box-shadow: var(--v2f3-shadow-md);
}

.v2f3-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--v2f3-shadow-lg);
}

.v2f3-btn-outline {
  background: transparent;
  color: var(--v2f3-secondary);
  border: 2px solid var(--v2f3-secondary);
}

.v2f3-btn-outline:hover {
  background: var(--v2f3-secondary);
  color: var(--v2f3-white);
}

.v2f3-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2.4rem;
  height: 2.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.v2f3-hamburger span {
  width: 100%;
  height: 2px;
  background: var(--v2f3-white);
  border-radius: 2px;
  transition: all var(--v2f3-transition-fast);
}

.v2f3-hamburger.v2f3-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.v2f3-hamburger.v2f3-active span:nth-child(2) {
  opacity: 0;
}

.v2f3-hamburger.v2f3-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.v2f3-nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--v2f3-dark);
  backdrop-filter: blur(10px);
  z-index: 9999;
  transition: right var(--v2f3-transition-normal);
  overflow-y: auto;
  padding-top: 7rem;
}

.v2f3-nav-menu.v2f3-active {
  right: 0;
}

.v2f3-nav-list {
  list-style: none;
  padding: var(--v2f3-spacing-md);
}

.v2f3-nav-item {
  margin-bottom: var(--v2f3-spacing-sm);
}

.v2f3-nav-link {
  display: block;
  padding: var(--v2f3-spacing-md);
  color: var(--v2f3-light);
  text-decoration: none;
  border-radius: var(--v2f3-radius-md);
  transition: all var(--v2f3-transition-fast);
  font-weight: 500;
}

.v2f3-nav-link:hover {
  background: rgba(255, 140, 0, 0.1);
  color: var(--v2f3-secondary);
}

/* Carousel */
.v2f3-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--v2f3-radius-lg);
  margin-bottom: var(--v2f3-spacing-xl);
  box-shadow: var(--v2f3-shadow-lg);
}

.v2f3-carousel-container {
  display: flex;
  transition: transform var(--v2f3-transition-normal);
}

.v2f3-carousel-slide {
  min-width: 100%;
  position: relative;
}

.v2f3-carousel-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.v2f3-carousel-content {
  position: absolute;
  top: 50%;
  left: var(--v2f3-spacing-md);
  right: var(--v2f3-spacing-md);
  transform: translateY(-50%);
  text-align: center;
  color: var(--v2f3-white);
}

.v2f3-carousel-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: var(--v2f3-spacing-sm);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.v2f3-carousel-text {
  font-size: 1.4rem;
  margin-bottom: var(--v2f3-spacing-md);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.v2f3-carousel-indicators {
  position: absolute;
  bottom: var(--v2f3-spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--v2f3-spacing-xs);
}

.v2f3-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--v2f3-transition-fast);
}

.v2f3-carousel-indicator.v2f3-active {
  background: var(--v2f3-secondary);
  transform: scale(1.2);
}

/* Game Cards */
.v2f3-games-section {
  margin-bottom: var(--v2f3-spacing-xl);
}

.v2f3-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--v2f3-secondary);
  margin-bottom: var(--v2f3-spacing-md);
  text-align: center;
}

.v2f3-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--v2f3-spacing-sm);
  margin-bottom: var(--v2f3-spacing-lg);
}

.v2f3-game-card {
  background: linear-gradient(135deg, var(--v2f3-primary) 0%, var(--v2f3-dark) 100%);
  border-radius: var(--v2f3-radius-md);
  padding: var(--v2f3-spacing-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--v2f3-transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 100px;
}

.v2f3-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--v2f3-shadow-lg);
  border-color: var(--v2f3-secondary);
}

.v2f3-game-image {
  width: 100%;
  height: 60px;
  object-fit: contain;
  margin-bottom: var(--v2f3-spacing-xs);
  border-radius: var(--v2f3-radius-sm);
}

.v2f3-game-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--v2f3-white);
  margin: 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Sections */
.v2f3-content-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--v2f3-radius-lg);
  padding: var(--v2f3-spacing-lg);
  margin-bottom: var(--v2f3-spacing-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v2f3-content-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--v2f3-secondary);
  margin-bottom: var(--v2f3-spacing-md);
}

.v2f3-content-text {
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--v2f3-light);
  margin-bottom: var(--v2f3-spacing-md);
}

.v2f3-cta-section {
  text-align: center;
  padding: var(--v2f3-spacing-xxl) var(--v2f3-spacing-md);
  background: linear-gradient(135deg, var(--v2f3-secondary) 0%, var(--v2f3-accent) 100%);
  border-radius: var(--v2f3-radius-xl);
  margin-bottom: var(--v2f3-spacing-xl);
}

.v2f3-cta-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--v2f3-white);
  margin-bottom: var(--v2f3-spacing-md);
}

.v2f3-cta-text {
  font-size: 1.8rem;
  color: var(--v2f3-white);
  margin-bottom: var(--v2f3-spacing-lg);
  opacity: 0.9;
}

/* Bottom Navigation */
.v2f3-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--v2f3-dark) 0%, var(--v2f3-primary) 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--v2f3-spacing-sm) 0;
  display: none; /* Hidden by default, shown on mobile */
}

.v2f3-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.v2f3-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--v2f3-gray);
  transition: all var(--v2f3-transition-fast);
  border-radius: var(--v2f3-radius-md);
  position: relative;
  overflow: hidden;
}

.v2f3-bottom-nav-item:hover,
.v2f3-bottom-nav-item.v2f3-active {
  color: var(--v2f3-secondary);
  background: rgba(255, 140, 0, 0.1);
  transform: translateY(-2px);
}

.v2f3-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: var(--v2f3-spacing-xs);
}

.v2f3-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/* Ripple effect for bottom nav */
.v2f3-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 140, 0, 0.3);
  transform: scale(0);
  animation: v2f3-ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes v2f3-ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Footer */
.v2f3-footer {
  background: linear-gradient(135deg, var(--v2f3-dark) 0%, var(--v2f3-primary) 100%);
  padding: var(--v2f3-spacing-xl) var(--v2f3-spacing-md) var(--v2f3-spacing-md);
  margin-top: var(--v2f3-spacing-xxl);
}

.v2f3-footer-content {
  text-align: center;
}

.v2f3-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v2f3-spacing-md);
  margin-bottom: var(--v2f3-spacing-lg);
}

.v2f3-footer-link {
  color: var(--v2f3-light);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color var(--v2f3-transition-fast);
}

.v2f3-footer-link:hover {
  color: var(--v2f3-secondary);
}

.v2f3-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v2f3-spacing-md);
  margin-bottom: var(--v2f3-spacing-lg);
}

.v2f3-partner {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity var(--v2f3-transition-fast);
}

.v2f3-partner:hover {
  opacity: 1;
}

.v2f3-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--v2f3-spacing-md);
  margin-top: var(--v2f3-spacing-md);
}

.v2f3-copyright {
  font-size: 1.2rem;
  color: var(--v2f3-gray);
  margin-bottom: var(--v2f3-spacing-sm);
}

.v2f3-footer-legal {
  font-size: 1rem;
  color: var(--v2f3-gray);
  opacity: 0.7;
}

/* Scroll to Top Button */
.v2f3-scroll-top {
  position: fixed;
  bottom: 8rem;
  right: var(--v2f3-spacing-md);
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, var(--v2f3-secondary) 0%, var(--v2f3-accent) 100%);
  border: none;
  border-radius: 50%;
  color: var(--v2f3-white);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--v2f3-transition-fast);
  box-shadow: var(--v2f3-shadow-lg);
  z-index: 999;
}

.v2f3-scroll-top.v2f3-visible {
  opacity: 1;
  visibility: visible;
}

.v2f3-scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--v2f3-shadow-xl);
}

/* Utility Classes */
.v2f3-mb-sm { margin-bottom: var(--v2f3-spacing-sm); }
.v2f3-mb-md { margin-bottom: var(--v2f3-spacing-md); }
.v2f3-mb-lg { margin-bottom: var(--v2f3-spacing-lg); }
.v2f3-mb-xl { margin-bottom: var(--v2f3-spacing-xl); }

.v2f3-mt-sm { margin-top: var(--v2f3-spacing-sm); }
.v2f3-mt-md { margin-top: var(--v2f3-spacing-md); }
.v2f3-mt-lg { margin-top: var(--v2f3-spacing-lg); }
.v2f3-mt-xl { margin-top: var(--v2f3-spacing-xl); }

.v2f3-p-sm { padding: var(--v2f3-spacing-sm); }
.v2f3-p-md { padding: var(--v2f3-spacing-md); }
.v2f3-p-lg { padding: var(--v2f3-spacing-lg); }

.v2f3-text-primary { color: var(--v2f3-primary); }
.v2f3-text-secondary { color: var(--v2f3-secondary); }
.v2f3-text-accent { color: var(--v2f3-accent); }
.v2f3-text-light { color: var(--v2f3-light); }
.v2f3-text-gray { color: var(--v2f3-gray); }

.v2f3-bg-primary { background-color: var(--v2f3-primary); }
.v2f3-bg-secondary { background-color: var(--v2f3-secondary); }
.v2f3-bg-accent { background-color: var(--v2f3-accent); }
.v2f3-bg-dark { background-color: var(--v2f3-dark); }
.v2f3-bg-light { background-color: var(--v2f3-light); }

.v2f3-hidden { display: none; }
.v2f3-visible { display: block; }

.v2f3-lazy {
  opacity: 0;
  transition: opacity var(--v2f3-transition-normal);
}

.v2f3-lazy.loaded {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .v2f3-hamburger {
    display: flex;
  }

  .v2f3-nav-actions .v2f3-btn:not(.v2f3-btn-primary) {
    display: none;
  }

  .v2f3-bottom-nav {
    display: block;
  }

  .v2f3-main {
    padding-bottom: 8rem;
  }

  .v2f3-games-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .v2f3-carousel-title {
    font-size: 2rem;
  }

  .v2f3-carousel-text {
    font-size: 1.2rem;
  }

  .v2f3-content-title {
    font-size: 2rem;
  }

  .v2f3-cta-title {
    font-size: 2.4rem;
  }
}

@media (max-width: 480px) {
  .v2f3-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .v2f3-carousel-slide img {
    height: 150px;
  }

  .v2f3-cta-section {
    padding: var(--v2f3-spacing-xl) var(--v2f3-spacing-sm);
  }
}

/* Print Styles */
@media print {
  .v2f3-header,
  .v2f3-bottom-nav,
  .v2f3-scroll-top {
    display: none !important;
  }

  .v2f3-main {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --v2f3-primary: #808080;
    --v2f3-secondary: #FF6600;
    --v2f3-accent: #FFD700;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Dark mode support (already dark theme) */
@media (prefers-color-scheme: light) {
  body {
    background-color: var(--v2f3-light);
    color: var(--v2f3-dark);
  }
}