/* Lawinplay CSS Styles - Part 1 */
/* All classes use prefix v8d8- to avoid conflicts */

/* CSS Variables */
:root {
  --v8d8-primary: #FFB6C1;
  --v8d8-secondary: #FFB3FF;
  --v8d8-accent: #FFFFBA;
  --v8d8-light: #CED4DA;
  --v8d8-dark: #1A1A2E;
  --v8d8-white: #FFFFFF;
  --v8d8-black: #000000;
  --v8d8-text: #333333;
  --v8d8-text-light: #666666;
  --v8d8-border: #E0E0E0;
  --v8d8-shadow: rgba(0, 0, 0, 0.1);
  --v8d8-shadow-lg: rgba(0, 0, 0, 0.2);
  --v8d8-success: #4CAF50;
  --v8d8-warning: #FF9800;
  --v8d8-error: #F44336;
  --v8d8-info: #2196F3;
  --v8d8-radius: 0.5rem;
  --v8d8-radius-lg: 1rem;
  --v8d8-transition: all 0.3s ease;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 10px base for easy rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--v8d8-text);
  background-color: var(--v8d8-dark);
  overflow-x: hidden;
}

/* Container and Layout */
.v8d8-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.v8d8-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.v8d8-main {
  flex: 1;
  padding-bottom: 8rem; /* Space for bottom nav on mobile */
}

@media (min-width: 769px) {
  .v8d8-main {
    padding-bottom: 2rem;
  }
}

/* Header and Navigation */
.v8d8-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--v8d8-dark) 0%, #2A2A3E 100%);
  border-bottom: 1px solid var(--v8d8-light);
  backdrop-filter: blur(10px);
}

.v8d8-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 430px;
  margin: 0 auto;
}

.v8d8-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--v8d8-white);
  font-weight: 700;
  font-size: 1.8rem;
}

.v8d8-logo-icon {
  width: 2.4rem;
  height: 2.4rem;
  background: linear-gradient(45deg, var(--v8d8-primary), var(--v8d8-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--v8d8-dark);
}

.v8d8-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.v8d8-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: var(--v8d8-radius);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--v8d8-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem; /* Touch-friendly height */
  touch-action: manipulation;
}

.v8d8-btn-primary {
  background: linear-gradient(45deg, var(--v8d8-primary), var(--v8d8-secondary));
  color: var(--v8d8-dark);
}

.v8d8-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--v8d8-shadow-lg);
}

.v8d8-btn-secondary {
  background: transparent;
  color: var(--v8d8-white);
  border: 2px solid var(--v8d8-light);
}

.v8d8-btn-secondary:hover {
  background: var(--v8d8-light);
  color: var(--v8d8-dark);
}

.v8d8-menu-toggle {
  background: none;
  border: none;
  color: var(--v8d8-white);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--v8d8-radius);
  transition: var(--v8d8-transition);
}

.v8d8-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.v8d8-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, var(--v8d8-dark) 0%, #2A2A3E 100%);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  border-left: 1px solid var(--v8d8-light);
}

.v8d8-mobile-menu.active {
  right: 0;
}

.v8d8-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--v8d8-transition);
}

.v8d8-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.v8d8-menu-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--v8d8-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v8d8-menu-close {
  background: none;
  border: none;
  color: var(--v8d8-white);
  font-size: 2.4rem;
  cursor: pointer;
}

.v8d8-menu-nav {
  padding: 1rem 0;
}

.v8d8-menu-item {
  display: block;
  padding: 1.2rem 1.5rem;
  color: var(--v8d8-white);
  text-decoration: none;
  transition: var(--v8d8-transition);
  border-left: 3px solid transparent;
}

.v8d8-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--v8d8-primary);
}

/* Carousel */
.v8d8-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--v8d8-radius-lg);
  margin: 1rem 0;
}

.v8d8-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.v8d8-carousel-slide.active {
  opacity: 1;
}

.v8d8-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v8d8-carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
}

.v8d8-carousel-btn {
  background: rgba(0, 0, 0, 0.5);
  color: var(--v8d8-white);
  border: none;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--v8d8-transition);
}

.v8d8-carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Typography */
.v8d8-h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--v8d8-white);
  margin: 2rem 0 1rem;
  line-height: 1.2;
}

.v8d8-h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--v8d8-white);
  margin: 1.5rem 0 1rem;
}

.v8d8-h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--v8d8-white);
  margin: 1rem 0 0.5rem;
}

.v8d8-text {
  color: var(--v8d8-text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.v8d8-text-center {
  text-align: center;
}

/* Cards and Sections */
.v8d8-section {
  padding: 2rem 0;
}

.v8d8-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--v8d8-radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--v8d8-transition);
}

.v8d8-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--v8d8-shadow);
}

/* Game Grid */
.v8d8-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.v8d8-game-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--v8d8-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--v8d8-transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.v8d8-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px var(--v8d8-shadow-lg);
  background: rgba(255, 255, 255, 0.1);
}

.v8d8-game-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--v8d8-radius);
  margin-bottom: 0.5rem;
  object-fit: cover;
}

.v8d8-game-name {
  font-size: 1.1rem;
  color: var(--v8d8-white);
  font-weight: 500;
  line-height: 1.2;
}

/* Bottom Navigation */
.v8d8-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--v8d8-dark) 0%, #2A2A3E 100%);
  border-top: 1px solid var(--v8d8-light);
  z-index: 1000;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.5rem 0;
}

@media (min-width: 769px) {
  .v8d8-bottom-nav {
    display: none;
  }
}

.v8d8-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--v8d8-transition);
  border-radius: var(--v8d8-radius);
  text-decoration: none;
  color: var(--v8d8-light);
  background: none;
  border: none;
}

.v8d8-bottom-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.v8d8-bottom-nav-item.active {
  color: var(--v8d8-primary);
  background: rgba(255, 182, 193, 0.2);
}

.v8d8-bottom-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
}

.v8d8-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.v8d8-footer {
  background: linear-gradient(135deg, #0A0A1E 0%, var(--v8d8-dark) 100%);
  border-top: 1px solid var(--v8d8-light);
  padding: 2rem 0 8rem; /* Extra padding for bottom nav */
  margin-top: 3rem;
}

.v8d8-footer-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.v8d8-footer-section {
  margin-bottom: 2rem;
}

.v8d8-footer-title {
  color: var(--v8d8-white);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.v8d8-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.v8d8-footer-link {
  color: var(--v8d8-light);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--v8d8-transition);
}

.v8d8-footer-link:hover {
  color: var(--v8d8-primary);
}

.v8d8-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.v8d8-partner {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--v8d8-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--v8d8-transition);
}

.v8d8-partner:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.v8d8-partner img {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
}

.v8d8-copyright {
  text-align: center;
  color: var(--v8d8-light);
  font-size: 1.1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.v8d8-flex {
  display: flex;
}

.v8d8-flex-col {
  flex-direction: column;
}

.v8d8-items-center {
  align-items: center;
}

.v8d8-justify-center {
  justify-content: center;
}

.v8d8-justify-between {
  justify-content: space-between;
}

.v8d8-gap-1 {
  gap: 0.5rem;
}

.v8d8-gap-2 {
  gap: 1rem;
}

.v8d8-mb-1 {
  margin-bottom: 0.5rem;
}

.v8d8-mb-2 {
  margin-bottom: 1rem;
}

.v8d8-mb-3 {
  margin-bottom: 1.5rem;
}

.v8d8-mt-1 {
  margin-top: 0.5rem;
}

.v8d8-mt-2 {
  margin-top: 1rem;
}

.v8d8-mt-3 {
  margin-top: 1.5rem;
}

.v8d8-p-1 {
  padding: 0.5rem;
}

.v8d8-p-2 {
  padding: 1rem;
}

.v8d8-p-3 {
  padding: 1.5rem;
}

.v8d8-text-center {
  text-align: center;
}

.v8d8-text-left {
  text-align: left;
}

.v8d8-text-right {
  text-align: right;
}

.v8d8-hidden {
  display: none;
}

.v8d8-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .v8d8-container {
    padding: 0 0.5rem;
  }

  .v8d8-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.8rem;
  }

  .v8d8-h1 {
    font-size: 2rem;
  }

  .v8d8-h2 {
    font-size: 1.6rem;
  }

  .v8d8-carousel {
    height: 160px;
  }
}

@media (min-width: 769px) {
  .v8d8-header-content {
    max-width: 1200px;
  }

  .v8d8-main {
    max-width: 1200px;
    margin: 0 auto;
  }

  .v8d8-footer-content {
    max-width: 1200px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.v8d8-fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.v8d8-slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .v8d8-btn,
  .v8d8-bottom-nav-item,
  .v8d8-game-card {
    -webkit-tap-highlight-color: transparent;
  }

  .v8d8-btn:active,
  .v8d8-bottom-nav-item:active,
  .v8d8-game-card:active {
    transform: scale(0.95);
  }
}