/* KK KL Login Theme CSS */
/* All classes use prefix: pgdc- */

/* CSS Variables */
:root {
  --pgdc-primary: #CD853F;
  --pgdc-secondary: #A0522D;
  --pgdc-bg: #141414;
  --pgdc-text: #F5F5F5;
  --pgdc-text-secondary: #D3D3D3;
  --pgdc-border: #333333;
  --pgdc-accent: #FFD700;
  --pgdc-success: #32CD32;
  --pgdc-error: #FF4500;

  /* Spacing */
  --pgdc-spacing-xs: 0.5rem;
  --pgdc-spacing-sm: 1rem;
  --pgdc-spacing-md: 1.5rem;
  --pgdc-spacing-lg: 2rem;
  --pgdc-spacing-xl: 3rem;

  /* Typography */
  --pgdc-font-size-xs: 1.2rem;
  --pgdc-font-size-sm: 1.4rem;
  --pgdc-font-size-base: 1.6rem;
  --pgdc-font-size-lg: 1.8rem;
  --pgdc-font-size-xl: 2.2rem;
  --pgdc-font-size-2xl: 2.8rem;

  /* Layout */
  --pgdc-max-width: 430px;
  --pgdc-header-height: 60px;
  --pgdc-bottom-nav-height: 64px;
}

/* 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, Arial, sans-serif;
  font-size: var(--pgdc-font-size-base);
  line-height: 1.5;
  color: var(--pgdc-text);
  background-color: var(--pgdc-bg);
  max-width: var(--pgdc-max-width);
  margin: 0 auto;
  overflow-x: hidden;
}

/* Typography */
.pgdc-h1 {
  font-size: var(--pgdc-font-size-2xl);
  font-weight: 700;
  color: var(--pgdc-primary);
  margin-bottom: var(--pgdc-spacing-md);
  line-height: 1.2;
}

.pgdc-h2 {
  font-size: var(--pgdc-font-size-xl);
  font-weight: 600;
  color: var(--pgdc-text);
  margin-bottom: var(--pgdc-spacing-sm);
  line-height: 1.3;
}

.pgdc-h3 {
  font-size: var(--pgdc-font-size-lg);
  font-weight: 600;
  color: var(--pgdc-primary);
  margin-bottom: var(--pgdc-spacing-xs);
}

.pgdc-p {
  font-size: var(--pgdc-font-size-base);
  color: var(--pgdc-text-secondary);
  margin-bottom: var(--pgdc-spacing-sm);
  line-height: 1.6;
}

.pgdc-small {
  font-size: var(--pgdc-font-size-xs);
  color: var(--pgdc-text-secondary);
}

/* Layout Components */
.pgdc-container {
  width: 100%;
  padding: 0 var(--pgdc-spacing-sm);
  margin: 0 auto;
}

.pgdc-wrapper {
  min-height: 100vh;
  padding-top: var(--pgdc-header-height);
  padding-bottom: var(--pgdc-bottom-nav-height);
}

.pgdc-grid {
  display: grid;
  gap: var(--pgdc-spacing-sm);
}

.pgdc-flex {
  display: flex;
  align-items: center;
  gap: var(--pgdc-spacing-xs);
}

.pgdc-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header */
.pgdc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--pgdc-header-height);
  background: linear-gradient(135deg, var(--pgdc-bg) 0%, #1a1a1a 100%);
  border-bottom: 1px solid var(--pgdc-border);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.pgdc-header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pgdc-spacing-sm);
}

.pgdc-logo {
  display: flex;
  align-items: center;
  gap: var(--pgdc-spacing-xs);
  text-decoration: none;
}

.pgdc-logo img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.pgdc-logo-text {
  font-size: var(--pgdc-font-size-lg);
  font-weight: 700;
  color: var(--pgdc-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pgdc-header-actions {
  display: flex;
  align-items: center;
  gap: var(--pgdc-spacing-xs);
}

/* Buttons */
.pgdc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--pgdc-spacing-xs) var(--pgdc-spacing-sm);
  font-size: var(--pgdc-font-size-sm);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  white-space: nowrap;
}

.pgdc-btn-primary {
  background: linear-gradient(135deg, var(--pgdc-primary) 0%, var(--pgdc-secondary) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(205, 133, 63, 0.3);
}

.pgdc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(205, 133, 63, 0.4);
}

.pgdc-btn-secondary {
  background: transparent;
  color: var(--pgdc-primary);
  border: 2px solid var(--pgdc-primary);
}

.pgdc-btn-secondary:hover {
  background: var(--pgdc-primary);
  color: white;
}

.pgdc-btn-text {
  background: none;
  color: var(--pgdc-text);
  padding: var(--pgdc-spacing-xs);
}

.pgdc-btn-text:hover {
  color: var(--pgdc-primary);
}

/* Navigation */
.pgdc-nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--pgdc-spacing-xs);
  min-width: 44px;
  min-height: 44px;
}

.pgdc-nav-toggle span {
  width: 24px;
  height: 3px;
  background: var(--pgdc-primary);
  transition: all 0.3s ease;
}

.pgdc-nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.pgdc-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.pgdc-nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.pgdc-mobile-menu {
  position: fixed;
  top: var(--pgdc-header-height);
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - var(--pgdc-header-height));
  background: linear-gradient(135deg, var(--pgdc-bg) 0%, #1a1a1a 100%);
  border-left: 1px solid var(--pgdc-border);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.pgdc-mobile-menu.active {
  right: 0;
}

.pgdc-menu-overlay {
  position: fixed;
  top: var(--pgdc-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.pgdc-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pgdc-menu-list {
  padding: var(--pgdc-spacing-md);
}

.pgdc-menu-item {
  display: block;
  padding: var(--pgdc-spacing-sm);
  color: var(--pgdc-text);
  text-decoration: none;
  font-size: var(--pgdc-font-size-base);
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-bottom: var(--pgdc-spacing-xs);
}

.pgdc-menu-item:hover {
  background: rgba(205, 133, 63, 0.1);
  color: var(--pgdc-primary);
}

/* Carousel */
.pgdc-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: var(--pgdc-spacing-lg);
}

.pgdc-carousel-container {
  display: flex;
  transition: transform 0.5s ease;
}

.pgdc-carousel-slide {
  min-width: 100%;
  position: relative;
}

.pgdc-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.pgdc-carousel-dots {
  position: absolute;
  bottom: var(--pgdc-spacing-sm);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--pgdc-spacing-xs);
}

.pgdc-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pgdc-carousel-dot.active {
  background: var(--pgdc-primary);
  transform: scale(1.2);
}

/* Game Grid */
.pgdc-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--pgdc-spacing-xs);
  margin-bottom: var(--pgdc-spacing-lg);
}

.pgdc-game-item {
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.pgdc-game-item:hover {
  transform: translateY(-4px);
}

.pgdc-game-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto var(--pgdc-spacing-xs);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pgdc-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pgdc-game-name {
  font-size: var(--pgdc-font-size-xs);
  color: var(--pgdc-text);
  line-height: 1.3;
  height: 2.6rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Cards */
.pgdc-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
  border: 1px solid var(--pgdc-border);
  border-radius: 12px;
  padding: var(--pgdc-spacing-md);
  margin-bottom: var(--pgdc-spacing-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pgdc-card-header {
  display: flex;
  align-items: center;
  gap: var(--pgdc-spacing-xs);
  margin-bottom: var(--pgdc-spacing-sm);
}

.pgdc-card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pgdc-primary);
  border-radius: 8px;
  color: white;
  font-size: var(--pgdc-font-size-lg);
}

/* Bottom Navigation */
.pgdc-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pgdc-bottom-nav-height);
  background: linear-gradient(135deg, var(--pgdc-bg) 0%, #1a1a1a 100%);
  border-top: 1px solid var(--pgdc-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: var(--pgdc-spacing-xs) 0;
  z-index: 1000;
}

.pgdc-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  min-height: 60px;
  padding: var(--pgdc-spacing-xs);
  text-decoration: none;
  color: var(--pgdc-text-secondary);
  transition: all 0.3s ease;
  border-radius: 8px;
}

.pgdc-bottom-nav-item:hover,
.pgdc-bottom-nav-item.active {
  color: var(--pgdc-primary);
  transform: translateY(-2px);
}

.pgdc-bottom-nav-icon {
  font-size: 24px;
  line-height: 1;
}

.pgdc-bottom-nav-label {
  font-size: var(--pgdc-font-size-xs);
  line-height: 1;
}

/* Footer */
.pgdc-footer {
  background: linear-gradient(135deg, #0a0a0a 0%, var(--pgdc-bg) 100%);
  border-top: 1px solid var(--pgdc-border);
  padding: var(--pgdc-spacing-lg) 0;
  margin-bottom: var(--pgdc-bottom-nav-height);
}

.pgdc-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pgdc-spacing-md);
  margin-bottom: var(--pgdc-spacing-lg);
}

.pgdc-partner-logo {
  width: 60px;
  height: 30px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.pgdc-partner-logo:hover {
  opacity: 1;
}

.pgdc-partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pgdc-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pgdc-spacing-md);
  margin-bottom: var(--pgdc-spacing-lg);
}

.pgdc-footer-link {
  color: var(--pgdc-text-secondary);
  text-decoration: none;
  font-size: var(--pgdc-font-size-sm);
  transition: color 0.3s ease;
}

.pgdc-footer-link:hover {
  color: var(--pgdc-primary);
}

.pgdc-copyright {
  text-align: center;
  font-size: var(--pgdc-font-size-xs);
  color: var(--pgdc-text-secondary);
  opacity: 0.7;
}

/* Utility Classes */
.pgdc-text-center {
  text-align: center;
}

.pgdc-text-primary {
  color: var(--pgdc-primary);
}

.pgdc-text-secondary {
  color: var(--pgdc-text-secondary);
}

.pgdc-mb-xs {
  margin-bottom: var(--pgdc-spacing-xs);
}

.pgdc-mb-sm {
  margin-bottom: var(--pgdc-spacing-sm);
}

.pgdc-mb-md {
  margin-bottom: var(--pgdc-spacing-md);
}

.pgdc-mb-lg {
  margin-bottom: var(--pgdc-spacing-lg);
}

.pgdc-mt-md {
  margin-top: var(--pgdc-spacing-md);
}

/* Responsive */
@media (max-width: 768px) {
  .pgdc-wrapper {
    padding-bottom: var(--pgdc-bottom-nav-height);
  }

  .pgdc-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }

  .pgdc-game-icon {
    width: 50px;
    height: 50px;
  }
}

@media (min-width: 769px) {
  .pgdc-bottom-nav {
    display: none;
  }

  .pgdc-wrapper {
    padding-bottom: 0;
  }

  .pgdc-footer {
    margin-bottom: 0;
  }
}

/* Animations */
@keyframes pgdc-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pgdc-fade-in {
  animation: pgdc-fadeIn 0.6s ease forwards;
}

/* Loading State */
body:not(.loaded) .pgdc-fade-in {
  opacity: 0;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
.pgdc-btn:focus,
.pgdc-menu-item:focus,
.pgdc-game-item:focus {
  outline: 2px solid var(--pgdc-primary);
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--pgdc-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--pgdc-primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pgdc-secondary);
}