/**
 * PhPlay SuperAce - Core Stylesheet
 * @version 1.0.0
 * @description Mobile-first responsive design for PhPlay SuperAce
 */

/* CSS Variables */
:root {
  --superace-primary: #7C4DFF;
  --superace-secondary: #FFC107;
  --superace-dark: #212121;
  --superace-darker: #1a1a1a;
  --superace-light: #ffffff;
  --superace-gray: #757575;
  --superace-gray-light: #e0e0e0;
  --superace-success: #4CAF50;
  --superace-warning: #FF9800;
  --superace-error: #f44336;

  /* Spacing */
  --superace-xs: 0.25rem;
  --superace-sm: 0.5rem;
  --superace-md: 1rem;
  --superace-lg: 1.5rem;
  --superace-xl: 2rem;

  /* Typography */
  --superace-font-base: 62.5%;
  --superace-font-xs: 1.2rem;
  --superace-font-sm: 1.4rem;
  --superace-font-base-size: 1.6rem;
  --superace-font-lg: 1.8rem;
  --superace-font-xl: 2.4rem;
  --superace-font-2xl: 3.2rem;

  /* Layout */
  --superace-max-width: 430px;
  --superace-header-height: 60px;
  --superace-bottom-nav-height: 60px;

  /* Effects */
  --superace-shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --superace-shadow-md: 0 4px 6px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.23);
  --superace-shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
  --superace-radius-sm: 4px;
  --superace-radius-md: 8px;
  --superace-radius-lg: 12px;
  --superace-radius-full: 9999px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--superace-font-base);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: var(--superace-font-base-size);
  line-height: 1.5;
  color: var(--superace-light);
  background-color: var(--superace-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.superace-container {
  width: 100%;
  max-width: var(--superace-max-width);
  margin: 0 auto;
  padding: 0 var(--superace-md);
}

.superace-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.superace-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--superace-header-height);
  background: linear-gradient(135deg, var(--superace-primary) 0%, #5E35B1 100%);
  box-shadow: var(--superace-shadow-md);
  z-index: 1000;
  transition: all 0.3s ease;
}

.superace-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--superace-max-width);
  margin: 0 auto;
  padding: 0 var(--superace-md);
}

.superace-logo {
  display: flex;
  align-items: center;
  gap: var(--superace-sm);
  text-decoration: none;
  color: var(--superace-light);
  font-weight: 700;
  font-size: var(--superace-font-sm);
}

.superace-logo img {
  width: 32px;
  height: 32px;
  border-radius: var(--superace-radius-sm);
}

.superace-header-actions {
  display: flex;
  gap: var(--superace-sm);
}

.superace-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--superace-sm) var(--superace-md);
  background: var(--superace-light);
  color: var(--superace-primary);
  border: none;
  border-radius: var(--superace-radius-full);
  font-weight: 600;
  font-size: var(--superace-font-xs);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.superace-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--superace-shadow-lg);
}

.superace-btn:active {
  transform: translateY(0);
}

.superace-btn-primary {
  background: var(--superace-secondary);
  color: var(--superace-dark);
}

.superace-btn-small {
  padding: var(--superace-xs) var(--superace-sm);
  font-size: 1.1rem;
}

.superace-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--superace-sm);
  z-index: 1001;
}

.superace-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--superace-light);
  border-radius: var(--superace-radius-full);
  transition: all 0.3s ease;
}

.superace-menu-toggle.superace-menu-open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.superace-menu-toggle.superace-menu-open span:nth-child(2) {
  opacity: 0;
}

.superace-menu-toggle.superace-menu-open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.superace-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--superace-darker);
  box-shadow: var(--superace-shadow-lg);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: var(--superace-xl) var(--superace-md);
}

.superace-mobile-menu.superace-menu-open {
  right: 0;
}

.superace-menu-header {
  display: flex;
  align-items: center;
  gap: var(--superace-md);
  margin-bottom: var(--superace-xl);
  padding-bottom: var(--superace-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.superace-menu-nav {
  display: flex;
  flex-direction: column;
  gap: var(--superace-sm);
}

.superace-menu-nav a {
  display: flex;
  align-items: center;
  gap: var(--superace-md);
  padding: var(--superace-md);
  color: var(--superace-light);
  text-decoration: none;
  border-radius: var(--superace-radius-md);
  transition: all 0.3s ease;
  font-size: var(--superace-font-base-size);
}

.superace-menu-nav a:hover {
  background: rgba(124, 77, 255, 0.1);
  color: var(--superace-primary);
}

.superace-menu-nav i {
  font-size: var(--superace-font-lg);
  width: 24px;
  text-align: center;
}

/* Main Content */
.superace-main {
  flex: 1;
  padding-top: var(--superace-header-height);
  padding-bottom: var(--superace-bottom-nav-height);
}

@media (min-width: 769px) {
  .superace-main {
    padding-bottom: var(--superace-lg);
  }
}

/* Carousel */
.superace-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: var(--superace-lg);
}

.superace-carousel-slide {
  width: 100%;
  height: 100%;
  display: none;
}

.superace-carousel-slide:first-child {
  display: block;
}

.superace-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.superace-carousel-dots {
  position: absolute;
  bottom: var(--superace-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--superace-sm);
  z-index: 10;
}

.superace-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--superace-radius-full);
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.superace-carousel-dot.superace-dot-active {
  background: var(--superace-secondary);
  width: 24px;
}

/* Sections */
.superace-section {
  padding: var(--superace-lg) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.superace-section-title {
  font-size: var(--superace-font-xl);
  font-weight: 700;
  color: var(--superace-secondary);
  margin-bottom: var(--superace-lg);
  text-align: center;
}

/* Game Grid */
.superace-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--superace-sm);
  margin-bottom: var(--superace-lg);
}

.superace-game-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--superace-radius-md);
  background: var(--superace-darker);
  transition: all 0.3s ease;
  cursor: pointer;
}

.superace-game-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--superace-shadow-lg);
}

.superace-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.superace-game-name {
  padding: var(--superace-sm);
  font-size: var(--superace-font-xs);
  font-weight: 600;
  text-align: center;
  color: var(--superace-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cards */
.superace-card {
  background: var(--superace-darker);
  border-radius: var(--superace-radius-lg);
  padding: var(--superace-lg);
  margin-bottom: var(--superace-md);
  box-shadow: var(--superace-shadow-md);
}

.superace-card-title {
  font-size: var(--superace-font-lg);
  font-weight: 700;
  color: var(--superace-secondary);
  margin-bottom: var(--superace-md);
}

.superace-card-content {
  font-size: var(--superace-font-base-size);
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

/* Footer */
.superace-footer {
  background: var(--superace-darker);
  padding: var(--superace-xl) var(--superace-md);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.superace-footer-section {
  margin-bottom: var(--superace-lg);
}

.superace-footer-title {
  font-size: var(--superace-font-lg);
  font-weight: 700;
  color: var(--superace-secondary);
  margin-bottom: var(--superace-md);
}

.superace-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--superace-sm);
  margin-bottom: var(--superace-lg);
}

.superace-footer-link {
  color: var(--superace-primary);
  text-decoration: none;
  font-size: var(--superace-font-sm);
  padding: var(--superace-xs) var(--superace-sm);
  background: rgba(124, 77, 255, 0.1);
  border-radius: var(--superace-radius-sm);
  transition: all 0.3s ease;
}

.superace-footer-link:hover {
  background: var(--superace-primary);
  color: var(--superace-light);
}

.superace-partners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--superace-sm);
  margin-bottom: var(--superace-lg);
}

.superace-partner img {
  width: 100%;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.superace-partner img:hover {
  opacity: 1;
}

.superace-copyright {
  text-align: center;
  padding: var(--superace-md) 0;
  color: var(--superace-gray);
  font-size: var(--superace-font-xs);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Bottom Navigation */
.superace-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--superace-bottom-nav-height);
  background: linear-gradient(180deg, var(--superace-darker) 0%, #000 100%);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

@media (min-width: 769px) {
  .superace-bottom-nav {
    display: none;
  }
}

.superace-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: var(--superace-sm);
  background: none;
  border: none;
  color: var(--superace-gray);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.superace-nav-item i {
  font-size: 24px;
  margin-bottom: 2px;
  transition: all 0.3s ease;
}

.superace-nav-item span {
  font-size: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.superace-nav-item:hover {
  color: var(--superace-primary);
  transform: scale(1.1);
}

.superace-nav-item.superace-nav-active {
  color: var(--superace-secondary);
}

.superace-nav-item.superace-nav-active i {
  transform: scale(1.2);
}

.superace-touched {
  transform: scale(0.95);
}

/* Tabs */
.superace-tabs {
  display: flex;
  gap: var(--superace-sm);
  margin-bottom: var(--superace-lg);
  overflow-x: auto;
  padding-bottom: var(--superace-sm);
}

.superace-tab-btn {
  flex-shrink: 0;
  padding: var(--superace-sm) var(--superace-md);
  background: var(--superace-darker);
  color: var(--superace-light);
  border: 2px solid transparent;
  border-radius: var(--superace-radius-full);
  font-size: var(--superace-font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.superace-tab-btn:hover {
  border-color: var(--superace-primary);
  color: var(--superace-primary);
}

.superace-tab-btn.superace-tab-active {
  background: var(--superace-primary);
  color: var(--superace-light);
  border-color: var(--superace-primary);
}

.superace-tab-content {
  display: none;
}

.superace-tab-content.superace-content-active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--superace-md);
}

h1 {
  font-size: var(--superace-font-2xl);
  color: var(--superace-secondary);
}

h2 {
  font-size: var(--superace-font-xl);
  color: var(--superace-primary);
}

h3 {
  font-size: var(--superace-font-lg);
}

p {
  margin-bottom: var(--superace-md);
}

a {
  color: var(--superace-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--superace-secondary);
}

/* Lists */
.superace-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.superace-list-item {
  padding: var(--superace-md);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: var(--superace-md);
}

.superace-list-item:last-child {
  border-bottom: none;
}

.superace-list-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--superace-radius-full);
  background: var(--superace-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.superace-list-icon i {
  color: var(--superace-light);
  font-size: var(--superace-font-base-size);
}

.superace-list-content {
  flex: 1;
}

.superace-list-title {
  font-weight: 600;
  color: var(--superace-light);
  margin-bottom: var(--superace-xs);
}

.superace-list-desc {
  font-size: var(--superace-font-sm);
  color: var(--superace-gray);
}

/* Notification */
.superace-notification {
  position: fixed;
  top: var(--superace-header-height);
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--superace-success);
  color: var(--superace-light);
  padding: var(--superace-md) var(--superace-lg);
  border-radius: var(--superace-radius-md);
  box-shadow: var(--superace-shadow-lg);
  z-index: 10000;
  transition: transform 0.3s ease;
  font-weight: 600;
}

.superace-notification.superace-notification-show {
  transform: translateX(-50%) translateY(0);
}

/* Utility Classes */
.superace-text-center {
  text-align: center;
}

.superace-text-primary {
  color: var(--superace-primary);
}

.superace-text-secondary {
  color: var(--superace-secondary);
}

.superace-mt-md {
  margin-top: var(--superace-md);
}

.superace-mb-md {
  margin-bottom: var(--superace-md);
}

.superace-py-lg {
  padding-top: var(--superace-lg);
  padding-bottom: var(--superace-lg);
}

.superace-hidden {
  display: none;
}
