/**
 * KM77 Layout Stylesheet
 * CSS Class prefix: sc8c-
 * Color Palette: #0A0A0A | #BA55D3 | #9400D3 | #F8F8FF
 * @version 1.0.0
 */

/* CSS Variables */
:root {
  --sc8c-primary: #BA55D3;
  --sc8c-primary-dark: #9400D3;
  --sc8c-bg-dark: #0A0A0A;
  --sc8c-bg-card: #1A0A1A;
  --sc8c-bg-light: #2A0A2A;
  --sc8c-text: #F8F8FF;
  --sc8c-text-muted: #D8D8E8;
  --sc8c-border: #BA55D3;
  --sc8c-gradient: linear-gradient(135deg, #BA55D3 0%, #9400D3 100%);
  --sc8c-shadow: 0 4px 20px rgba(186, 85, 211, 0.3);
  --sc8c-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 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, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--sc8c-text);
  background-color: var(--sc8c-bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--sc8c-transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Container */
.sc8c-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.sc8c-wrapper {
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Header */
.sc8c-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(186, 85, 211, 0.3);
  z-index: 1000;
  transition: var(--sc8c-transition);
}

.sc8c-header.sc8c-header-scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: var(--sc8c-shadow);
}

.sc8c-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.sc8c-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sc8c-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 8px;
}

.sc8c-logo-text {
  font-size: 2rem;
  font-weight: 700;
  background: var(--sc8c-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sc8c-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.sc8c-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--sc8c-transition);
  cursor: pointer;
}

.sc8c-btn-register {
  background: var(--sc8c-gradient);
  color: var(--sc8c-text);
  border: 2px solid var(--sc8c-primary);
}

.sc8c-btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(186, 85, 211, 0.4);
}

.sc8c-btn-login {
  background: transparent;
  color: var(--sc8c-primary);
  border: 2px solid var(--sc8c-primary);
}

.sc8c-btn-login:hover {
  background: var(--sc8c-primary);
  color: var(--sc8c-text);
}

/* Mobile Menu Toggle */
.sc8c-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

.sc8c-menu-toggle span {
  width: 2.4rem;
  height: 0.2rem;
  background: var(--sc8c-primary);
  border-radius: 2px;
  transition: var(--sc8c-transition);
}

.sc8c-menu-toggle:hover span {
  background: var(--sc8c-primary-dark);
}

/* Mobile Menu */
.sc8c-mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--sc8c-bg-card);
  z-index: 9999;
  transition: var(--sc8c-transition);
  overflow-y: auto;
  padding: 2rem 0;
  border-right: 1px solid var(--sc8c-border);
}

.sc8c-mobile-menu.sc8c-menu-active {
  left: 0;
}

.sc8c-menu-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(186, 85, 211, 0.2);
  margin-bottom: 1rem;
}

.sc8c-menu-close {
  font-size: 2rem;
  color: var(--sc8c-text);
  cursor: pointer;
  padding: 0.5rem;
}

.sc8c-menu-links {
  display: flex;
  flex-direction: column;
}

.sc8c-menu-links a {
  padding: 1.2rem 2rem;
  font-size: 1.6rem;
  color: var(--sc8c-text);
  border-left: 3px solid transparent;
  transition: var(--sc8c-transition);
}

.sc8c-menu-links a:hover {
  background: var(--sc8c-bg-light);
  border-left-color: var(--sc8c-primary);
  color: var(--sc8c-primary);
}

/* Menu Overlay */
.sc8c-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--sc8c-transition);
}

.sc8c-menu-overlay.sc8c-overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.sc8c-main {
  margin-top: 80px;
  padding: 2rem 0;
}

/* Carousel */
.sc8c-carousel-container {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--sc8c-shadow);
}

.sc8c-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.sc8c-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.sc8c-carousel-slide.sc8c-slide-active {
  opacity: 1;
}

.sc8c-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc8c-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.sc8c-carousel-prev,
.sc8c-carousel-next {
  width: 4rem;
  height: 4rem;
  background: rgba(10, 10, 10, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  transition: var(--sc8c-transition);
  border: 2px solid var(--sc8c-primary);
  color: var(--sc8c-primary);
  font-size: 1.8rem;
}

.sc8c-carousel-prev:hover,
.sc8c-carousel-next:hover {
  background: var(--sc8c-primary);
  color: var(--sc8c-text);
}

.sc8c-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.sc8c-carousel-indicator {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(248, 248, 255, 0.5);
  cursor: pointer;
  transition: var(--sc8c-transition);
}

.sc8c-carousel-indicator.sc8c-indicator-active {
  background: var(--sc8c-primary);
  transform: scale(1.2);
}

/* Section */
.sc8c-section {
  margin-bottom: 3rem;
}

.sc8c-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--sc8c-primary);
  text-align: center;
}

/* Game Grid */
.sc8c-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.sc8c-game-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--sc8c-transition);
  background: var(--sc8c-bg-card);
  border: 1px solid rgba(186, 85, 211, 0.2);
}

.sc8c-game-item:hover {
  transform: translateY(-4px);
  border-color: var(--sc8c-primary);
  box-shadow: 0 4px 15px rgba(186, 85, 211, 0.4);
}

.sc8c-game-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc8c-game-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10, 10, 10, 0.9));
  padding: 0.5rem;
  font-size: 1rem;
  text-align: center;
  color: var(--sc8c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card */
.sc8c-card {
  background: var(--sc8c-bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(186, 85, 211, 0.2);
  transition: var(--sc8c-transition);
}

.sc8c-card:hover {
  border-color: var(--sc8c-primary);
  box-shadow: var(--sc8c-shadow);
}

.sc8c-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--sc8c-primary);
}

.sc8c-card-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--sc8c-text-muted);
}

/* Featured Links */
.sc8c-featured-link {
  display: inline-block;
  color: var(--sc8c-primary);
  font-weight: 600;
  text-decoration: underline;
  transition: var(--sc8c-transition);
}

.sc8c-featured-link:hover {
  color: var(--sc8c-primary-dark);
  text-decoration: none;
}

/* CTA Button */
.sc8c-cta-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--sc8c-gradient);
  color: var(--sc8c-text);
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  transition: var(--sc8c-transition);
  border: 2px solid var(--sc8c-primary);
  cursor: pointer;
}

.sc8c-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(186, 85, 211, 0.5);
}

/* Bottom Navigation */
.sc8c-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.98);
  border-top: 2px solid var(--sc8c-border);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.sc8c-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  color: var(--sc8c-text-muted);
  transition: var(--sc8c-transition);
  position: relative;
}

.sc8c-bottom-nav a:hover {
  color: var(--sc8c-primary);
  transform: scale(1.05);
}

.sc8c-bottom-nav a.sc8c-nav-active {
  color: var(--sc8c-primary);
}

.sc8c-bottom-nav a.sc8c-nav-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--sc8c-primary);
  border-radius: 0 0 3px 3px;
}

.sc8c-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc8c-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.sc8c-footer {
  background: var(--sc8c-bg-card);
  padding: 3rem 0 8rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(186, 85, 211, 0.3);
}

.sc8c-footer-content {
  text-align: center;
}

.sc8c-footer-description {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--sc8c-text-muted);
  margin-bottom: 2rem;
}

.sc8c-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.sc8c-footer-links a {
  font-size: 1.4rem;
  color: var(--sc8c-primary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--sc8c-primary);
  border-radius: 6px;
  transition: var(--sc8c-transition);
}

.sc8c-footer-links a:hover {
  background: var(--sc8c-primary);
  color: var(--sc8c-text);
}

.sc8c-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.sc8c-partner-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--sc8c-transition);
}

.sc8c-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.sc8c-copyright {
  font-size: 1.3rem;
  color: var(--sc8c-text-muted);
  text-align: center;
}

/* Desktop Styles */
@media (min-width: 769px) {
  .sc8c-bottom-nav {
    display: none;
  }

  .sc8c-wrapper {
    padding-bottom: 2rem;
  }

  .sc8c-main {
    margin-top: 100px;
  }

  .sc8c-footer {
    padding-bottom: 3rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .sc8c-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
  }

  .sc8c-menu-toggle {
    display: flex;
  }
}

/* Utilities */
.sc8c-text-center {
  text-align: center;
}

.sc8c-mt-1 {
  margin-top: 1rem;
}

.sc8c-mt-2 {
  margin-top: 2rem;
}

.sc8c-mb-1 {
  margin-bottom: 1rem;
}

.sc8c-mb-2 {
  margin-bottom: 2rem;
}

.sc8c-py-1 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Animation */
@keyframes sc8c-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.sc8c-pulse {
  animation: sc8c-pulse 2s ease-in-out infinite;
}
