/**
 * Nusstar - Main Stylesheet
 * All classes use ui2d- prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --ui2d-primary: #CD853F;
  --ui2d-secondary: #F5DEB3;
  --ui2d-accent: #FF6347;
  --ui2d-dark: #2D2D2D;
  --ui2d-light: #F5DEB3;
  --ui2d-white: #FFFFFF;
  --ui2d-gray: #6B7280;
  --ui2d-border: #E5E7EB;
  --ui2d-shadow: rgba(0, 0, 0, 0.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(--ui2d-light);
  background-color: var(--ui2d-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Container */
.ui2d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ui2d-wrapper {
  padding-bottom: 8rem;
}

/* Header Styles */
.ui2d-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--ui2d-dark);
  border-bottom: 1px solid var(--ui2d-primary);
  z-index: 1000;
  box-shadow: 0 2px 8px var(--ui2d-shadow);
}

.ui2d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.ui2d-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ui2d-primary);
}

.ui2d-logo img {
  width: 28px;
  height: 28px;
}

.ui2d-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.ui2d-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ui2d-btn-primary {
  background-color: var(--ui2d-accent);
  color: var(--ui2d-white);
}

.ui2d-btn-primary:hover {
  background-color: #e5533d;
  transform: translateY(-1px);
}

.ui2d-btn-secondary {
  background-color: var(--ui2d-primary);
  color: var(--ui2d-white);
}

.ui2d-btn-secondary:hover {
  background-color: #b87332;
  transform: translateY(-1px);
}

.ui2d-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem;
  cursor: pointer;
}

.ui2d-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ui2d-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.ui2d-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background-color: var(--ui2d-dark);
  border-bottom: 1px solid var(--ui2d-primary);
  z-index: 9999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ui2d-mobile-menu.ui2d-menu-open {
  max-height: 500px;
}

.ui2d-menu-nav {
  padding: 1rem 0;
}

.ui2d-menu-link {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--ui2d-light);
  border-bottom: 1px solid rgba(245, 222, 179, 0.1);
  font-size: 1.4rem;
}

.ui2d-menu-link:hover {
  background-color: rgba(205, 133, 63, 0.1);
  color: var(--ui2d-primary);
}

.ui2d-menu-link:last-child {
  border-bottom: none;
}

/* Hero Carousel */
.ui2d-hero {
  margin-top: 60px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 1rem 1rem;
}

.ui2d-carousel {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.ui2d-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ui2d-slide.ui2d-active {
  opacity: 1;
}

.ui2d-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ui2d-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.ui2d-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ui2d-indicator.ui2d-active {
  background-color: var(--ui2d-primary);
  width: 24px;
  border-radius: 4px;
}

/* Content Sections */
.ui2d-section {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(245, 222, 179, 0.1);
}

.ui2d-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ui2d-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.ui2d-section-subtitle {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ui2d-secondary);
  margin-bottom: 1rem;
}

.ui2d-text {
  color: var(--ui2d-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Game Grid */
.ui2d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.ui2d-game-item {
  background-color: rgba(245, 222, 179, 0.05);
  border-radius: 0.8rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ui2d-game-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--ui2d-shadow);
}

.ui2d-game-icon {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--ui2d-dark);
}

.ui2d-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ui2d-game-name {
  padding: 0.5rem;
  font-size: 1.1rem;
  color: var(--ui2d-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category Tabs */
.ui2d-category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  scrollbar-width: none;
}

.ui2d-category-tab {
  padding: 0.5rem 1rem;
  background-color: rgba(205, 133, 63, 0.2);
  color: var(--ui2d-light);
  border-radius: 2rem;
  font-size: 1.2rem;
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ui2d-category-tab.ui2d-active,
.ui2d-category-tab:hover {
  background-color: var(--ui2d-primary);
  color: var(--ui2d-white);
}

/* Card Styles */
.ui2d-card {
  background-color: rgba(245, 222, 179, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(205, 133, 63, 0.2);
}

.ui2d-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ui2d-primary);
  margin-bottom: 1rem;
}

/* Accordion */
.ui2d-accordion-item {
  background-color: rgba(245, 222, 179, 0.05);
  border-radius: 0.8rem;
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.ui2d-accordion-header {
  padding: 1rem 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.ui2d-accordion-header:hover {
  background-color: rgba(205, 133, 63, 0.1);
}

.ui2d-accordion-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ui2d-light);
}

.ui2d-accordion-icon {
  transition: transform 0.3s ease;
  color: var(--ui2d-primary);
}

.ui2d-accordion-item.ui2d-active .ui2d-accordion-icon {
  transform: rotate(180deg);
}

.ui2d-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ui2d-accordion-body {
  padding: 0 1.2rem 1rem;
  color: var(--ui2d-secondary);
  font-size: 1.3rem;
  line-height: 1.6;
}

/* Link Styles */
.ui2d-link {
  color: var(--ui2d-accent);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.ui2d-link:hover {
  color: var(--ui2d-primary);
}

/* Footer */
.ui2d-footer {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 2rem 0 1rem;
  margin-top: 2rem;
}

.ui2d-footer-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ui2d-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.ui2d-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.ui2d-footer-link {
  padding: 0.4rem 0.8rem;
  background-color: rgba(205, 133, 63, 0.2);
  color: var(--ui2d-light);
  border-radius: 0.5rem;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.ui2d-footer-link:hover {
  background-color: var(--ui2d-primary);
  color: var(--ui2d-white);
}

.ui2d-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.ui2d-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.ui2d-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.ui2d-copyright {
  text-align: center;
  color: var(--ui2d-gray);
  font-size: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 222, 179, 0.1);
}

/* Bottom Navigation */
.ui2d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--ui2d-dark) 0%, rgba(45, 45, 45, 0.98) 100%);
  border-top: 2px solid var(--ui2d-primary);
  z-index: 1000;
  padding: 0.5rem 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.ui2d-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.ui2d-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ui2d-nav-item:hover {
  background-color: rgba(205, 133, 63, 0.15);
  transform: scale(1.05);
}

.ui2d-nav-item.ui2d-active {
  background-color: rgba(205, 133, 63, 0.2);
}

.ui2d-nav-icon {
  font-size: 24px;
  color: var(--ui2d-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ui2d-nav-item.ui2d-active .ui2d-nav-icon {
  color: var(--ui2d-accent);
}

.ui2d-nav-label {
  font-size: 10px;
  color: var(--ui2d-light);
  font-weight: 500;
}

.ui2d-nav-item.ui2d-active .ui2d-nav-label {
  color: var(--ui2d-accent);
  font-weight: 600;
}

/* Hide bottom navigation on desktop */
@media (min-width: 769px) {
  .ui2d-bottom-nav {
    display: none;
  }

  .ui2d-wrapper {
    padding-bottom: 2rem;
  }
}

/* Utility Classes */
.ui2d-mt-1 { margin-top: 1rem; }
.ui2d-mt-2 { margin-top: 2rem; }
.ui2d-mb-1 { margin-bottom: 1rem; }
.ui2d-mb-2 { margin-bottom: 2rem; }
.ui2d-text-center { text-align: center; }
.ui2d-text-bold { font-weight: 700; }
.ui2d-text-accent { color: var(--ui2d-accent); }
.ui2d-text-primary { color: var(--ui2d-primary); }

/* Promotional Button */
.ui2d-promo-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--ui2d-accent) 0%, var(--ui2d-primary) 100%);
  color: var(--ui2d-white);
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 99, 71, 0.3);
}

.ui2d-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 99, 71, 0.4);
}

.ui2d-promo-text {
  color: var(--ui2d-accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.ui2d-promo-text:hover {
  color: var(--ui2d-primary);
}
