/*
 * KKKJILI - Universal Stylesheet
 * CSS Class Prefix: sf85-
 * Color Scheme: #48D1CC (Cyan Primary) | #262626 (Dark Background)
 */

/* CSS Variables for theming */
:root {
  --sf85-primary: #48D1CC;
  --sf85-secondary: #262626;
  --sf85-accent: #FF6B6B;
  --sf85-success: #51CF66;
  --sf85-warning: #FFD93D;
  --sf85-dark: #1A1A1A;
  --sf85-light: #F5F5F5;
  --sf85-text: #FFFFFF;
  --sf85-text-light: #E0E0E0;
  --sf85-border: #444444;
  --sf85-shadow: rgba(0, 0, 0, 0.3);
  --sf85-transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--sf85-secondary);
  color: var(--sf85-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin: 1.5rem 0 1rem 0;
  font-weight: 700;
}

h1 {
  font-size: 2.8rem;
  color: var(--sf85-primary);
}

h2 {
  font-size: 2.2rem;
  color: var(--sf85-primary);
}

h3 {
  font-size: 1.8rem;
  color: var(--sf85-text);
}

h4, h5, h6 {
  font-size: 1.4rem;
}

p {
  margin: 0.8rem 0;
  color: var(--sf85-text-light);
}

a {
  color: var(--sf85-primary);
  text-decoration: none;
  transition: var(--sf85-transition);
}

a:hover {
  color: var(--sf85-accent);
  text-decoration: underline;
}

/* Container and Layout */
.sf85-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.sf85-wrapper {
  background-color: var(--sf85-secondary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sf85-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.sf85-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Navigation */
.sf85-header {
  background: linear-gradient(135deg, var(--sf85-dark) 0%, var(--sf85-secondary) 100%);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--sf85-primary);
  box-shadow: 0 2px 8px var(--sf85-shadow);
}

.sf85-header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}

.sf85-header-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.sf85-header-logo img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 8px;
}

.sf85-header-logo span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sf85-primary);
}

.sf85-header-nav {
  display: none;
}

@media (min-width: 769px) {
  .sf85-header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .sf85-header-nav a {
    font-size: 1.2rem;
    color: var(--sf85-text);
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0;
    transition: var(--sf85-transition);
  }

  .sf85-header-nav a:hover {
    color: var(--sf85-primary);
    border-bottom-color: var(--sf85-primary);
  }
}

.sf85-header-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.sf85-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--sf85-transition);
  display: inline-block;
  text-align: center;
  min-height: 36px;
  min-width: 44px;
}

.sf85-btn-primary {
  background-color: var(--sf85-primary);
  color: var(--sf85-dark);
}

.sf85-btn-primary:hover {
  background-color: #3DB8AD;
  transform: scale(1.05);
}

.sf85-btn-secondary {
  background-color: transparent;
  border: 2px solid var(--sf85-primary);
  color: var(--sf85-primary);
}

.sf85-btn-secondary:hover {
  background-color: var(--sf85-primary);
  color: var(--sf85-dark);
}

.sf85-btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 1.1rem;
}

/* Mobile Menu */
.sf85-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  font-size: 1.8rem;
  color: var(--sf85-primary);
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .sf85-menu-toggle {
    display: block;
  }

  .sf85-header-nav {
    display: none !important;
  }
}

.sf85-mobile-menu {
  position: fixed;
  left: -100%;
  top: 60px;
  flex-direction: column;
  background-color: var(--sf85-dark);
  width: 100%;
  text-align: center;
  transition: var(--sf85-transition);
  z-index: 999;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 2rem 0;
}

.sf85-menu-active {
  left: 0 !important;
}

.sf85-mobile-menu a {
  display: block;
  padding: 1rem;
  margin: 0.5rem 0;
  color: var(--sf85-text);
  border-bottom: 1px solid var(--sf85-border);
}

.sf85-mobile-menu a:hover {
  background-color: rgba(72, 209, 204, 0.1);
  color: var(--sf85-primary);
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 0;
}

@media (max-width: 768px) {
  main {
    padding-bottom: 80px;
  }
}

.sf85-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--sf85-border);
}

.sf85-section h2 {
  margin-top: 0;
}

/* Carousel */
.sf85-carousel-container {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--sf85-shadow);
}

.sf85-carousel-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-color: var(--sf85-dark);
}

.sf85-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.sf85-carousel-slide.sf85-carousel-active {
  opacity: 1;
}

.sf85-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf85-carousel-prev,
.sf85-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(72, 209, 204, 0.8);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
  transition: var(--sf85-transition);
}

.sf85-carousel-prev:hover,
.sf85-carousel-next:hover {
  background: var(--sf85-primary);
}

.sf85-carousel-prev {
  left: 1rem;
}

.sf85-carousel-next {
  right: 1rem;
}

.sf85-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.sf85-carousel-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--sf85-transition);
}

.sf85-carousel-dot.sf85-active {
  background-color: var(--sf85-primary);
}

/* Game Grid */
.sf85-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.sf85-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--sf85-transition);
  padding: 0.5rem;
  border-radius: 8px;
  background-color: rgba(72, 209, 204, 0.05);
}

.sf85-game-card:hover {
  background-color: rgba(72, 209, 204, 0.15);
  transform: translateY(-4px);
}

.sf85-game-card img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.sf85-game-card span {
  font-size: 1rem;
  text-align: center;
  color: var(--sf85-text-light);
  word-break: break-word;
}

.sf85-game-card:hover span {
  color: var(--sf85-primary);
}

/* Category Sections */
.sf85-category {
  margin: 2rem 0;
}

.sf85-category-title {
  font-size: 1.8rem;
  color: var(--sf85-primary);
  margin: 1rem 0;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--sf85-primary);
}

/* Cards */
.sf85-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sf85-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: var(--sf85-transition);
}

.sf85-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--sf85-primary);
}

.sf85-card-title {
  font-size: 1.6rem;
  color: var(--sf85-primary);
  margin-bottom: 0.8rem;
}

.sf85-card-content {
  color: var(--sf85-text-light);
  line-height: 1.6;
}

/* Bottom Navigation */
.sf85-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--sf85-dark) 0%, var(--sf85-secondary) 100%);
  border-top: 2px solid var(--sf85-primary);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  height: 64px;
  z-index: 1000;
  box-shadow: 0 -2px 8px var(--sf85-shadow);
}

@media (min-width: 769px) {
  .sf85-bottom-nav {
    display: none;
  }
}

.sf85-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.6rem 0.8rem;
  color: var(--sf85-text-light);
  text-decoration: none;
  transition: var(--sf85-transition);
  min-width: 60px;
  height: 64px;
  cursor: pointer;
  font-size: 1rem;
}

.sf85-nav-item:hover,
.sf85-nav-active {
  color: var(--sf85-primary);
  transform: scale(1.08);
}

.sf85-nav-icon {
  font-size: 2rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sf85-nav-label {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer */
.sf85-footer {
  background: linear-gradient(135deg, var(--sf85-dark) 0%, var(--sf85-secondary) 100%);
  border-top: 2px solid var(--sf85-primary);
  padding: 2rem 0;
  margin-top: 3rem;
}

.sf85-footer-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sf85-footer-section {
  margin: 1.5rem 0;
}

.sf85-footer-title {
  color: var(--sf85-primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.sf85-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}

.sf85-footer-links a {
  font-size: 1.1rem;
  color: var(--sf85-text-light);
}

.sf85-footer-links a:hover {
  color: var(--sf85-primary);
}

.sf85-partner-logos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  align-items: center;
  justify-items: center;
}

.sf85-partner-logo {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.5rem;
}

.sf85-partner-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sf85-footer-bottom {
  border-top: 1px solid var(--sf85-border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--sf85-text-light);
  font-size: 1.1rem;
}

/* Form Elements */
.sf85-form-group {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
}

.sf85-label {
  color: var(--sf85-text);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sf85-input,
.sf85-textarea,
.sf85-select {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sf85-border);
  color: var(--sf85-text);
  padding: 0.8rem;
  border-radius: 6px;
  font-size: 1.2rem;
  transition: var(--sf85-transition);
  font-family: inherit;
}

.sf85-input:focus,
.sf85-textarea:focus,
.sf85-select:focus {
  outline: none;
  border-color: var(--sf85-primary);
  background-color: rgba(72, 209, 204, 0.1);
}

.sf85-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Badges and Tags */
.sf85-badge {
  display: inline-block;
  background-color: var(--sf85-primary);
  color: var(--sf85-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  margin: 0.3rem;
}

.sf85-badge-secondary {
  background-color: var(--sf85-accent);
}

.sf85-badge-success {
  background-color: var(--sf85-success);
}

/* Utilities */
.sf85-text-center {
  text-align: center;
}

.sf85-text-right {
  text-align: right;
}

.sf85-mt {
  margin-top: 1rem;
}

.sf85-mb {
  margin-bottom: 1rem;
}

.sf85-mb-2 {
  margin-bottom: 2rem;
}

.sf85-hidden {
  display: none !important;
}

.sf85-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sf85-animate-in {
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sf85-loaded {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 430px) {
  html {
    font-size: 60%;
  }

  .sf85-game-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .sf85-container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }
}

/* Loading animation */
.sf85-loading {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--sf85-border);
  border-radius: 50%;
  border-top-color: var(--sf85-primary);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .sf85-header,
  .sf85-footer,
  .sf85-bottom-nav {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
