/**
 * Nunstar - Main Stylesheet
 * Mobile-first responsive design with color palette: #9C27B0 | #FFEB3B | #212121
 */

:root {
  --nstar-primary: #9C27B0;
  --nstar-secondary: #FFEB3B;
  --nstar-dark: #212121;
  --nstar-darker: #1a1a1a;
  --nstar-light: #f5f5f5;
  --nstar-white: #ffffff;
  --nstar-gray: #757575;
  --nstar-border: #424242;
  --nstar-gradient: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
  --nstar-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --nstar-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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(--nstar-light);
  background-color: var(--nstar-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.nstar-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nstar-wrapper {
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .nstar-wrapper {
    padding-bottom: 2rem;
  }
}

/* Header Styles */
.nstar-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--nstar-darker);
  box-shadow: var(--nstar-shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nstar-header.nstar-scrolled {
  background-color: rgba(26, 26, 26, 0.98);
  box-shadow: var(--nstar-shadow-lg);
}

.nstar-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.nstar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--nstar-white);
  font-size: 1.8rem;
  font-weight: 700;
}

.nstar-logo img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.nstar-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.nstar-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.nstar-btn-primary {
  background: var(--nstar-gradient);
  color: var(--nstar-white);
}

.nstar-btn-secondary {
  background-color: transparent;
  color: var(--nstar-secondary);
  border: 2px solid var(--nstar-secondary);
}

.nstar-btn:hover,
.nstar-btn:active {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}

.nstar-btn.nstar-touch-active {
  transform: scale(0.95);
}

/* Mobile Menu Toggle */
.nstar-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10001;
}

@media (min-width: 769px) {
  .nstar-menu-toggle {
    display: none;
  }
}

.nstar-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--nstar-white);
  transition: all 0.3s ease;
}

.nstar-menu-toggle.nstar-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nstar-menu-toggle.nstar-active span:nth-child(2) {
  opacity: 0;
}

.nstar-menu-toggle.nstar-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.nstar-mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--nstar-darker);
  box-shadow: var(--nstar-shadow-lg);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 5rem 1.5rem 2rem;
}

.nstar-mobile-menu.nstar-menu-open {
  left: 0;
}

.nstar-mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--nstar-white);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.nstar-nav-list {
  list-style: none;
}

.nstar-nav-item {
  margin-bottom: 0.5rem;
}

.nstar-nav-item a {
  display: block;
  padding: 1rem;
  color: var(--nstar-light);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nstar-nav-item a:hover,
.nstar-nav-item a.nstar-active {
  background-color: var(--nstar-primary);
  color: var(--nstar-white);
}

/* Overlay */
.nstar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.nstar-overlay.nstar-active {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.nstar-main {
  margin-top: 60px;
  padding: 1rem 0;
}

/* Carousel */
.nstar-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.nstar-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.nstar-slide.nstar-active {
  opacity: 1;
}

.nstar-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nstar-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--nstar-white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.nstar-carousel-btn:hover {
  background-color: var(--nstar-primary);
}

.nstar-carousel-prev {
  left: 10px;
}

.nstar-carousel-next {
  right: 10px;
}

/* Hero Section */
.nstar-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--nstar-gradient);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.nstar-hero h1 {
  font-size: 2.2rem;
  color: var(--nstar-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.nstar-hero p {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

/* Section Styles */
.nstar-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--nstar-darker);
  border-radius: 12px;
}

.nstar-section-title {
  font-size: 1.9rem;
  color: var(--nstar-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nstar-section-title i {
  color: var(--nstar-primary);
}

/* Game Grid */
.nstar-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.nstar-game-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--nstar-dark);
}

.nstar-game-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--nstar-shadow);
}

.nstar-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.nstar-game-name {
  font-size: 1.1rem;
  color: var(--nstar-white);
  text-align: center;
  padding: 0.5rem 0.3rem;
  background-color: rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category Tabs */
.nstar-category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  scrollbar-width: none;
}

.nstar-category-tabs::-webkit-scrollbar {
  display: none;
}

.nstar-category-tab {
  flex-shrink: 0;
  padding: 0.6rem 1.2rem;
  background-color: var(--nstar-dark);
  color: var(--nstar-light);
  border: 2px solid var(--nstar-primary);
  border-radius: 20px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nstar-category-tab.nstar-active {
  background-color: var(--nstar-primary);
  color: var(--nstar-white);
}

/* Feature Cards */
.nstar-card {
  background-color: var(--nstar-dark);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--nstar-primary);
}

.nstar-card h3 {
  font-size: 1.7rem;
  color: var(--nstar-secondary);
  margin-bottom: 0.8rem;
}

.nstar-card p {
  font-size: 1.4rem;
  color: var(--nstar-light);
  line-height: 1.6;
}

/* FAQ Section */
.nstar-faq-item {
  background-color: var(--nstar-dark);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.nstar-faq-question {
  padding: 1rem;
  background-color: var(--nstar-darker);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  color: var(--nstar-white);
  transition: all 0.3s ease;
}

.nstar-faq-question:hover {
  background-color: var(--nstar-primary);
}

.nstar-faq-answer {
  padding: 1rem;
  color: var(--nstar-light);
  font-size: 1.4rem;
  line-height: 1.6;
}

/* Footer */
.nstar-footer {
  background-color: var(--nstar-darker);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.nstar-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.nstar-footer-link {
  color: var(--nstar-secondary);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--nstar-primary);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nstar-footer-link:hover {
  background-color: var(--nstar-primary);
  color: var(--nstar-white);
}

.nstar-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.nstar-partner img {
  height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nstar-partner img:hover {
  opacity: 1;
}

.nstar-copyright {
  text-align: center;
  color: var(--nstar-gray);
  font-size: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nstar-border);
}

/* Bottom Navigation */
.nstar-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--nstar-darker) 0%, var(--nstar-dark) 100%);
  border-top: 2px solid var(--nstar-primary);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(156, 39, 176, 0.3);
}

@media (min-width: 769px) {
  .nstar-bottom-nav {
    display: none;
  }
}

.nstar-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  color: var(--nstar-light);
  text-decoration: none;
  border: none;
  background: none;
  padding: 0.5rem;
}

.nstar-bottom-nav-item i {
  font-size: 24px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nstar-bottom-nav-item span {
  font-size: 10px;
  font-weight: 500;
  color: var(--nstar-light);
}

.nstar-bottom-nav-item.nstar-active i,
.nstar-bottom-nav-item.nstar-active span {
  color: var(--nstar-secondary);
}

.nstar-bottom-nav-item:active {
  transform: scale(0.9);
}

.nstar-bottom-nav-item:hover {
  background-color: rgba(156, 39, 176, 0.2);
}

/* Promotional Links */
.nstar-promo-link {
  color: var(--nstar-secondary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nstar-promo-link:hover {
  color: var(--nstar-primary);
  text-decoration: underline;
}

/* Text Styling */
.nstar-text-gradient {
  background: var(--nstar-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nstar-highlight {
  color: var(--nstar-secondary);
  font-weight: 700;
}

/* Utility Classes */
.nstar-mt-1 { margin-top: 1rem; }
.nstar-mt-2 { margin-top: 2rem; }
.nstar-mb-1 { margin-bottom: 1rem; }
.nstar-mb-2 { margin-bottom: 2rem; }
.nstar-text-center { text-align: center; }
.nstar-flex { display: flex; }
.nstar-flex-center { display: flex; align-items: center; justify-content: center; }
.nstar-grid { display: grid; }

/* Responsive */
@media (max-width: 768px) {
  .nstar-hero h1 {
    font-size: 1.8rem;
  }

  .nstar-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 380px) {
  .nstar-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .nstar-section {
    padding: 1rem;
  }
}

/* Animation */
@keyframes nstarPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.nstar-pulse {
  animation: nstarPulse 2s infinite;
}
