/**
 * PH366 Login - Main Stylesheet
 * Website: ph366login.click
 * All classes use s946- prefix for namespace isolation
 * Mobile-first responsive design (max-width: 430px)
 */

/* CSS Variables */
:root {
  --s946-primary: #008B8B;
  --s946-primary-light: #00AAAA;
  --s946-primary-dark: #006666;
  --s946-dark: #0D1117;
  --s946-dark-alt: #161B22;
  --s946-gray: #696969;
  --s946-gray-dark: #2F2F2F;
  --s946-gray-medium: #5D5D5D;
  --s946-gray-light: #8B8B8B;
  --s946-white: #FFFFFF;
  --s946-text: #E6EDF3;
  --s946-text-muted: #8B949E;
  --s946-border: #30363D;
  --s946-success: #238636;
  --s946-warning: #D29922;
  --s946-danger: #DA3633;
  --s946-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --s946-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --s946-radius: 8px;
  --s946-radius-lg: 12px;
  --s946-transition: 0.3s ease;
  --s946-header-height: 60px;
  --s946-bottom-nav-height: 60px;
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--s946-dark);
  color: var(--s946-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--s946-primary-light);
  text-decoration: none;
  transition: color var(--s946-transition);
}

a:hover {
  color: var(--s946-primary);
}

/* Typography */
.s946-h1, h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--s946-white);
  line-height: 1.3;
}

.s946-h2, h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--s946-white);
}

.s946-h3, h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--s946-text);
}

.s946-text-muted {
  color: var(--s946-text-muted);
}

.s946-text-primary {
  color: var(--s946-primary-light);
}

/* Layout */
.s946-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
}

.s946-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.s946-main {
  flex: 1;
  padding-top: var(--s946-header-height);
  padding-bottom: calc(var(--s946-bottom-nav-height) + 20px);
}

.s946-section {
  padding: 24px 0;
}

.s946-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--s946-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.s946-section-title i {
  color: var(--s946-primary-light);
}

/* Header */
.s946-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--s946-header-height);
  background: var(--s946-dark-alt);
  border-bottom: 1px solid var(--s946-border);
  z-index: 1000;
  transition: all var(--s946-transition);
}

.s946-header-scrolled {
  background: rgba(22, 27, 34, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--s946-shadow);
}

.s946-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 16px;
}

.s946-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s946-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.s946-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--s946-white);
  text-transform: uppercase;
}

.s946-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.s946-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--s946-radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--s946-transition);
  text-decoration: none;
  gap: 6px;
  min-height: 36px;
}

.s946-btn-primary {
  background: var(--s946-primary);
  color: var(--s946-white);
}

.s946-btn-primary:hover {
  background: var(--s946-primary-light);
  color: var(--s946-white);
  transform: translateY(-1px);
}

.s946-btn-outline {
  background: transparent;
  color: var(--s946-primary-light);
  border: 1px solid var(--s946-primary);
}

.s946-btn-outline:hover {
  background: var(--s946-primary);
  color: var(--s946-white);
}

.s946-btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
  min-height: 32px;
}

.s946-btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  min-height: 44px;
}

.s946-btn-block {
  width: 100%;
}

/* Hamburger Menu */
.s946-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.s946-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--s946-text);
  transition: all var(--s946-transition);
}

.s946-hamburger-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.s946-hamburger-active span:nth-child(2) {
  opacity: 0;
}

.s946-hamburger-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.s946-mobile-menu {
  position: fixed;
  top: var(--s946-header-height);
  right: -100%;
  width: 280px;
  height: calc(100vh - var(--s946-header-height));
  background: var(--s946-dark-alt);
  border-left: 1px solid var(--s946-border);
  z-index: 9999;
  transition: right var(--s946-transition);
  overflow-y: auto;
  padding: 20px;
}

.s946-menu-active {
  right: 0;
}

.s946-menu-overlay {
  position: fixed;
  top: var(--s946-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  z-index: 9998;
  transition: all var(--s946-transition);
}

.s946-overlay-active {
  opacity: 1;
  visibility: visible;
}

.s946-menu-nav {
  list-style: none;
}

.s946-menu-item {
  border-bottom: 1px solid var(--s946-border);
}

.s946-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  color: var(--s946-text);
  font-size: 0.9375rem;
  transition: color var(--s946-transition);
}

.s946-menu-link:hover {
  color: var(--s946-primary-light);
}

.s946-menu-link i {
  width: 20px;
  text-align: center;
  color: var(--s946-gray-light);
}

/* Carousel */
.s946-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--s946-radius-lg);
  margin: 16px 0;
}

.s946-carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.s946-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.s946-slide-active {
  opacity: 1;
}

.s946-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s946-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.s946-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all var(--s946-transition);
}

.s946-dot-active {
  background: var(--s946-primary-light);
  width: 24px;
  border-radius: 4px;
}

.s946-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: var(--s946-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--s946-transition);
}

.s946-carousel-nav:hover {
  background: var(--s946-primary);
}

.s946-carousel-prev {
  left: 12px;
}

.s946-carousel-next {
  right: 12px;
}

/* Game Grid */
.s946-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.s946-game-card {
  position: relative;
  border-radius: var(--s946-radius);
  overflow: hidden;
  background: var(--s946-gray-dark);
  cursor: pointer;
  transition: transform var(--s946-transition);
}

.s946-game-card:hover {
  transform: scale(1.05);
}

.s946-game-card:active {
  transform: scale(0.98);
}

.s946-game-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.s946-game-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  font-size: 0.625rem;
  text-align: center;
  color: var(--s946-white);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards and Content Boxes */
.s946-card {
  background: var(--s946-dark-alt);
  border: 1px solid var(--s946-border);
  border-radius: var(--s946-radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.s946-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.s946-card-icon {
  width: 40px;
  height: 40px;
  background: var(--s946-primary);
  border-radius: var(--s946-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--s946-white);
  font-size: 1.25rem;
}

.s946-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--s946-white);
}

.s946-card-content p {
  margin-bottom: 12px;
  color: var(--s946-text-muted);
}

.s946-card-content p:last-child {
  margin-bottom: 0;
}

/* Feature List */
.s946-feature-list {
  list-style: none;
}

.s946-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--s946-border);
}

.s946-feature-item:last-child {
  border-bottom: none;
}

.s946-feature-icon {
  width: 32px;
  height: 32px;
  background: var(--s946-gray-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--s946-primary-light);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.s946-feature-text {
  flex: 1;
}

.s946-feature-title {
  font-weight: 600;
  color: var(--s946-white);
  margin-bottom: 4px;
}

.s946-feature-desc {
  font-size: 0.875rem;
  color: var(--s946-text-muted);
}

/* Accordion */
.s946-accordion {
  border: 1px solid var(--s946-border);
  border-radius: var(--s946-radius-lg);
  overflow: hidden;
}

.s946-accordion-item {
  border-bottom: 1px solid var(--s946-border);
}

.s946-accordion-item:last-child {
  border-bottom: none;
}

.s946-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--s946-dark-alt);
  cursor: pointer;
  transition: background var(--s946-transition);
}

.s946-accordion-header:hover {
  background: var(--s946-gray-dark);
}

.s946-accordion-question {
  font-weight: 600;
  color: var(--s946-white);
  font-size: 0.9375rem;
  padding-right: 12px;
}

.s946-accordion-icon {
  color: var(--s946-primary-light);
  transition: transform var(--s946-transition);
}

.s946-accordion-active .s946-accordion-icon {
  transform: rotate(180deg);
}

.s946-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--s946-dark);
}

.s946-accordion-answer {
  padding: 16px;
  color: var(--s946-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Bottom Navigation */
.s946-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--s946-bottom-nav-height);
  background: var(--s946-dark-alt);
  border-top: 1px solid var(--s946-border);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.s946-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  padding: 6px 8px;
  color: var(--s946-gray-light);
  text-decoration: none;
  border-radius: var(--s946-radius);
  transition: all var(--s946-transition);
  cursor: pointer;
  background: none;
  border: none;
}

.s946-bottom-nav-item:hover,
.s946-bottom-nav-item:active {
  color: var(--s946-primary-light);
  background: rgba(0, 139, 139, 0.1);
}

.s946-bottom-nav-item.s946-nav-active {
  color: var(--s946-primary-light);
}

.s946-bottom-nav-icon {
  font-size: 22px;
  margin-bottom: 4px;
  line-height: 1;
}

.s946-bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Footer */
.s946-footer {
  background: var(--s946-dark-alt);
  border-top: 1px solid var(--s946-border);
  padding: 24px 16px;
  margin-bottom: var(--s946-bottom-nav-height);
}

.s946-footer-partners {
  margin-bottom: 20px;
}

.s946-footer-partners-title {
  font-size: 0.75rem;
  color: var(--s946-gray-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-align: center;
}

.s946-partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.s946-partner-logo {
  height: 28px;
  width: auto;
  opacity: 0.7;
  transition: opacity var(--s946-transition);
  filter: grayscale(50%);
}

.s946-partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.s946-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.s946-footer-link {
  color: var(--s946-text-muted);
  font-size: 0.8125rem;
  transition: color var(--s946-transition);
}

.s946-footer-link:hover {
  color: var(--s946-primary-light);
}

.s946-footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: var(--s946-gray);
}

/* Promo Banner */
.s946-promo-banner {
  background: linear-gradient(135deg, var(--s946-primary-dark), var(--s946-primary));
  border-radius: var(--s946-radius-lg);
  padding: 20px;
  margin: 16px 0;
  text-align: center;
  cursor: pointer;
  transition: transform var(--s946-transition);
}

.s946-promo-banner:hover {
  transform: scale(1.02);
}

.s946-promo-banner img {
  width: 100%;
  border-radius: var(--s946-radius);
}

/* Category Tabs */
.s946-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  margin-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.s946-tabs::-webkit-scrollbar {
  display: none;
}

.s946-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--s946-gray-dark);
  border: 1px solid var(--s946-border);
  border-radius: 20px;
  color: var(--s946-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--s946-transition);
}

.s946-tab:hover,
.s946-tab.s946-tab-active {
  background: var(--s946-primary);
  border-color: var(--s946-primary);
  color: var(--s946-white);
}

/* Stats/Badge */
.s946-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--s946-gray-dark);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--s946-text-muted);
}

.s946-badge-primary {
  background: var(--s946-primary);
  color: var(--s946-white);
}

/* Internal Link Style */
.s946-internal-link {
  color: var(--s946-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.s946-internal-link:hover {
  color: var(--s946-primary);
}

/* CTA Section */
.s946-cta {
  background: linear-gradient(135deg, var(--s946-gray-dark), var(--s946-dark-alt));
  border: 1px solid var(--s946-border);
  border-radius: var(--s946-radius-lg);
  padding: 24px 20px;
  text-align: center;
  margin: 20px 0;
}

.s946-cta-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--s946-white);
  margin-bottom: 8px;
}

.s946-cta-text {
  color: var(--s946-text-muted);
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

/* Desktop Styles */
@media (min-width: 769px) {
  .s946-bottom-nav {
    display: none;
  }

  .s946-main {
    padding-bottom: 20px;
  }

  .s946-footer {
    margin-bottom: 0;
  }

  .s946-container {
    max-width: 768px;
  }

  .s946-game-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .s946-hamburger {
    display: none;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .s946-main {
    padding-bottom: calc(var(--s946-bottom-nav-height) + 20px);
  }

  .s946-h1, h1 {
    font-size: 1.5rem;
  }

  .s946-h2, h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 430px) {
  .s946-container {
    padding: 0 12px;
  }

  .s946-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .s946-game-name {
    font-size: 0.5625rem;
    padding: 4px 2px;
  }

  .s946-card {
    padding: 16px;
  }

  .s946-btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

/* Utility Classes */
.s946-mb-0 { margin-bottom: 0; }
.s946-mb-1 { margin-bottom: 8px; }
.s946-mb-2 { margin-bottom: 16px; }
.s946-mb-3 { margin-bottom: 24px; }
.s946-mt-1 { margin-top: 8px; }
.s946-mt-2 { margin-top: 16px; }
.s946-mt-3 { margin-top: 24px; }
.s946-text-center { text-align: center; }
.s946-hidden { display: none; }
.s946-flex { display: flex; }
.s946-flex-center { display: flex; align-items: center; justify-content: center; }
.s946-gap-1 { gap: 8px; }
.s946-gap-2 { gap: 16px; }
