/**
 * King PH - Main Stylesheet
 * All classes use ve74- prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --ve74-primary: #9932CC;
  --ve74-primary-dark: #9400D3;
  --ve74-secondary: #8A2BE2;
  --ve74-accent: #A0522D;
  --ve74-bg: #2C2C2C;
  --ve74-bg-dark: #1a1a1a;
  --ve74-bg-light: #3d3d3d;
  --ve74-text: #f5f5f5;
  --ve74-text-muted: #b8b8b8;
  --ve74-border: #4a4a4a;
  --ve74-success: #22c55e;
  --ve74-warning: #f59e0b;
  --ve74-danger: #ef4444;
}

/* 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, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--ve74-text);
  background-color: var(--ve74-bg);
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Container */
.ve74-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.ve74-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--ve74-primary-dark) 0%, var(--ve74-primary) 100%);
  padding: 12px 16px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ve74-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
}

.ve74-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ve74-text);
}

.ve74-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.ve74-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ve74-text);
}

.ve74-header-buttons {
  display: flex;
  gap: 8px;
}

.ve74-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.ve74-btn-register {
  background: var(--ve74-accent);
  color: #fff;
}

.ve74-btn-login {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.ve74-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Toggle */
.ve74-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.ve74-menu-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.ve74-mobile-menu {
  position: fixed;
  top: 56px;
  left: -100%;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--ve74-bg-dark);
  padding: 16px;
  z-index: 9999;
  transition: left 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ve74-menu-open {
  left: 0;
}

.ve74-menu-backdrop {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  display: none;
}

.ve74-menu-open + .ve74-menu-backdrop {
  display: block;
}

.ve74-nav-link {
  display: block;
  padding: 12px 16px;
  color: var(--ve74-text);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

.ve74-nav-link:hover {
  background: var(--ve74-bg-light);
}

.ve74-active {
  background: var(--ve74-primary);
}

/* Main Content */
main {
  margin-top: 56px;
  padding-bottom: 80px;
}

.ve74-section {
  padding: 20px 0;
}

.ve74-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ve74-text);
}

/* Carousel */
.ve74-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.ve74-carousel-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve74-carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.ve74-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Game Grid */
.ve74-game-section {
  margin-bottom: 24px;
}

.ve74-game-category-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ve74-primary);
}

.ve74-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.ve74-game-item {
  text-align: center;
  text-decoration: none;
  color: var(--ve74-text);
  transition: transform 0.2s ease;
}

.ve74-game-item:hover {
  transform: scale(1.05);
}

.ve74-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 4px;
  background: var(--ve74-bg-light);
}

.ve74-game-name {
  font-size: 1rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ve74-text);
}

/* Content Cards */
.ve74-card {
  background: var(--ve74-bg-light);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ve74-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ve74-primary);
}

.ve74-card-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--ve74-text);
}

.ve74-card-link {
  color: var(--ve74-primary);
  text-decoration: none;
  font-weight: 600;
}

.ve74-card-link:hover {
  text-decoration: underline;
}

/* Promotional Buttons */
.ve74-promo-btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--ve74-primary) 0%, var(--ve74-primary-dark) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 8px 4px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(153, 50, 204, 0.3);
}

.ve74-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(153, 50, 204, 0.4);
}

.ve74-promo-text {
  color: var(--ve74-primary);
  font-weight: 700;
  text-decoration: none;
}

.ve74-promo-text:hover {
  text-decoration: underline;
}

/* Footer */
.ve74-footer {
  background: var(--ve74-bg-dark);
  padding: 24px 16px;
  margin-top: 32px;
}

.ve74-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ve74-footer-link {
  color: var(--ve74-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.ve74-footer-link:hover {
  color: var(--ve74-primary);
  background: var(--ve74-bg-light);
}

.ve74-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ve74-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
}

.ve74-copyright {
  text-align: center;
  color: var(--ve74-text-muted);
  font-size: 1.1rem;
}

/* Bottom Navigation (Mobile) */
.ve74-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--ve74-bg-dark) 0%, var(--ve74-bg) 100%);
  border-top: 1px solid var(--ve74-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  z-index: 1000;
  max-width: 430px;
  margin: 0 auto;
}

.ve74-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--ve74-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 4px;
}

.ve74-nav-item:hover {
  color: var(--ve74-primary);
  transform: scale(1.1);
}

.ve74-nav-item.active {
  color: var(--ve74-primary);
}

.ve74-nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.ve74-nav-label {
  font-size: 10px;
  font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .ve74-bottom-nav {
    display: none;
  }

  main {
    padding-bottom: 20px;
  }
}

/* Touch feedback */
.ve74-touch-active {
  transform: scale(0.95);
  opacity: 0.8;
}

/* Utility Classes */
.ve74-text-center {
  text-align: center;
}

.ve74-mb-1 {
  margin-bottom: 8px;
}

.ve74-mb-2 {
  margin-bottom: 16px;
}

.ve74-mb-3 {
  margin-bottom: 24px;
}

.ve74-mt-1 {
  margin-top: 8px;
}

.ve74-mt-2 {
  margin-top: 16px;
}

.ve74-mt-3 {
  margin-top: 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  main {
    padding-bottom: 80px;
  }
}
