/**
 * phjoy login - CSS Theme
 * Prefix: v16d-
 * Color Scheme: Purple-Lavender Theme
 * Mobile-First Design (max-width: 430px)
 */

:root {
  --v16d-primary: #9932CC;
  --v16d-accent: #8470FF;
  --v16d-light: #E6E6FA;
  --v16d-bg-dark: #0D1117;
  --v16d-text-dark: #1A1A2E;
  --v16d-text-light: #FFFFFF;
  --v16d-border: #6A5ACD;
  --v16d-hover: #BA55D3;
  --v16d-shadow: rgba(153, 50, 204, 0.2);
  --v16d-shadow-dark: rgba(13, 17, 23, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--v16d-bg-dark);
  color: var(--v16d-text-light);
  line-height: 1.6;
  font-size: 14px;
}

/* ==================== HEADER ==================== */
.v16d-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--v16d-bg-dark) 0%, rgba(153, 50, 204, 0.1) 100%);
  border-bottom: 2px solid var(--v16d-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 1000;
  box-shadow: 0 4px 12px var(--v16d-shadow);
}

.v16d-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--v16d-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v16d-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--v16d-primary) 0%, var(--v16d-accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--v16d-light);
}

.v16d-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.v16d-btn-primary,
.v16d-btn-secondary {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.v16d-btn-primary {
  background: linear-gradient(135deg, var(--v16d-primary) 0%, var(--v16d-accent) 100%);
  color: var(--v16d-light);
}

.v16d-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--v16d-shadow);
}

.v16d-btn-secondary {
  background: transparent;
  border: 2px solid var(--v16d-primary);
  color: var(--v16d-light);
}

.v16d-btn-secondary:hover {
  background: var(--v16d-primary);
  box-shadow: 0 4px 12px var(--v16d-shadow);
}

.v16d-menu-toggle {
  background: none;
  border: none;
  color: var(--v16d-light);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
}

.v16d-menu-toggle:hover {
  color: var(--v16d-accent);
  transform: scale(1.1);
}

/* ==================== MAIN CONTENT ==================== */
main {
  margin-top: 60px;
  padding-bottom: 80px;
  min-height: calc(100vh - 60px);
}

/* ==================== CAROUSEL ==================== */
.v16d-carousel {
  position: relative;
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--v16d-bg-dark) 0%, rgba(153, 50, 204, 0.15) 100%);
  overflow: hidden;
  border-bottom: 3px solid var(--v16d-primary);
}

.v16d-carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.v16d-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.v16d-carousel-slide.v16d-active {
  opacity: 1;
}

.v16d-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v16d-carousel-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.v16d-carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(230, 230, 250, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.v16d-carousel-indicator.v16d-active {
  background: var(--v16d-light);
  width: 24px;
  border-radius: 5px;
}

.v16d-carousel-prev,
.v16d-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(153, 50, 204, 0.7);
  border: none;
  color: var(--v16d-light);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 5;
}

.v16d-carousel-prev:hover,
.v16d-carousel-next:hover {
  background: var(--v16d-primary);
  transform: translateY(-50%) scale(1.1);
}

.v16d-carousel-prev {
  left: 10px;
}

.v16d-carousel-next {
  right: 10px;
}

/* ==================== HERO SECTION ==================== */
.v16d-hero {
  padding: 20px 15px;
  text-align: center;
  background: linear-gradient(180deg, rgba(153, 50, 204, 0.05) 0%, var(--v16d-bg-dark) 100%);
  border-bottom: 2px solid var(--v16d-border);
}

.v16d-hero h1 {
  font-size: 24px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--v16d-accent) 0%, var(--v16d-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.v16d-hero p {
  font-size: 13px;
  color: rgba(230, 230, 250, 0.9);
  margin-bottom: 15px;
}

.v16d-promo-banner {
  background: linear-gradient(135deg, var(--v16d-primary) 0%, var(--v16d-accent) 100%);
  padding: 12px;
  border-radius: 8px;
  margin: 0 0 15px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.v16d-promo-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--v16d-shadow);
}

.v16d-promo-banner p {
  color: var(--v16d-light);
  font-weight: 600;
  margin: 0;
}

/* ==================== GAME FILTERS ==================== */
.v16d-filter-section {
  padding: 20px 15px;
  background: var(--v16d-bg-dark);
  border-bottom: 2px solid var(--v16d-border);
}

.v16d-filter-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.v16d-filter-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border: 2px solid var(--v16d-border);
  background: transparent;
  color: var(--v16d-light);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.v16d-filter-btn:hover {
  border-color: var(--v16d-accent);
  color: var(--v16d-accent);
}

.v16d-filter-btn.v16d-active {
  background: linear-gradient(135deg, var(--v16d-primary) 0%, var(--v16d-accent) 100%);
  border-color: var(--v16d-primary);
  color: var(--v16d-light);
}

/* ==================== GAME GRID ==================== */
.v16d-game-section {
  padding: 20px 15px;
  background: var(--v16d-bg-dark);
}

.v16d-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--v16d-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.v16d-section-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--v16d-primary) 0%, var(--v16d-accent) 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.v16d-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 25px;
}

.v16d-game-card {
  background: rgba(153, 50, 204, 0.08);
  border: 2px solid var(--v16d-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.v16d-game-card:hover {
  border-color: var(--v16d-accent);
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--v16d-shadow);
  background: rgba(153, 50, 204, 0.15);
}

.v16d-game-card.v16d-visible {
  opacity: 1;
}

.v16d-game-card-image {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--v16d-primary), var(--v16d-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.v16d-game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.v16d-game-card:hover .v16d-game-card-image img {
  transform: scale(1.08);
}

.v16d-game-card-content {
  padding: 12px;
}

.v16d-game-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--v16d-light);
  text-align: center;
  word-wrap: break-word;
  line-height: 1.3;
}

.v16d-game-type {
  font-size: 11px;
  color: var(--v16d-accent);
  text-align: center;
  margin-top: 4px;
}

/* ==================== BOTTOM NAVIGATION ==================== */
.v16d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(153, 50, 204, 0.15) 0%, var(--v16d-bg-dark) 100%);
  border-top: 2px solid var(--v16d-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 12px var(--v16d-shadow);
}

.v16d-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(230, 230, 250, 0.7);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  min-width: 60px;
  min-height: 60px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.v16d-bottom-nav-btn:hover {
  color: var(--v16d-accent);
}

.v16d-bottom-nav-btn.v16d-active {
  color: var(--v16d-light);
}

.v16d-bottom-nav-btn.v16d-active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--v16d-primary), var(--v16d-accent));
  border-radius: 2px;
}

.v16d-nav-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v16d-nav-label {
  font-size: 10px;
  white-space: nowrap;
}

/* ==================== MOBILE MENU ==================== */
#webb61-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--v16d-bg-dark);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#webb61-mobile-menu.v16d-visible {
  transform: translateX(0);
}

.v16d-menu-content {
  padding: 20px 15px;
}

.v16d-menu-item {
  display: block;
  padding: 15px;
  color: var(--v16d-light);
  text-decoration: none;
  border-bottom: 1px solid var(--v16d-border);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.v16d-menu-item:hover {
  background: rgba(153, 50, 204, 0.1);
  border-left-color: var(--v16d-primary);
  padding-left: 20px;
}

/* ==================== FOOTER ==================== */
.v16d-footer {
  background: rgba(13, 17, 23, 0.95);
  border-top: 2px solid var(--v16d-border);
  padding: 20px 15px;
  text-align: center;
}

.v16d-footer-text {
  font-size: 12px;
  color: rgba(230, 230, 250, 0.7);
  margin-bottom: 10px;
}

.v16d-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.v16d-footer-link {
  font-size: 11px;
  color: var(--v16d-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.v16d-footer-link:hover {
  color: var(--v16d-light);
}

/* ==================== UTILITIES ==================== */
.v16d-container {
  max-width: 430px;
  margin: 0 auto;
  width: 100%;
  padding: 0 15px;
}

.v16d-text-center {
  text-align: center;
}

.v16d-mt-20 {
  margin-top: 20px;
}

.v16d-scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.v16d-scroll-animate.v16d-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (min-width: 769px) {
  body {
    font-size: 15px;
  }

  main {
    padding-bottom: 20px;
  }

  .v16d-bottom-nav {
    display: none;
  }

  .v16d-menu-toggle {
    display: none;
  }

  #webb61-mobile-menu {
    position: static;
    transform: none;
    background: transparent;
    top: auto;
    bottom: auto;
  }

  .v16d-carousel {
    height: 350px;
  }

  .v16d-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .v16d-hero h1 {
    font-size: 32px;
  }

  .v16d-header {
    padding: 0 30px;
  }
}

@media (max-width: 360px) {
  .v16d-game-grid {
    grid-template-columns: 1fr;
  }

  .v16d-carousel {
    height: 180px;
  }

  .v16d-hero h1 {
    font-size: 20px;
  }

  .v16d-btn-primary,
  .v16d-btn-secondary {
    padding: 6px 12px;
    font-size: 11px;
  }
}
