/* PhoneJoy Universal CSS Styles */
/* All classes use gf65- prefix for namespace isolation */

/* CSS Variables */
:root {
  --gf65-primary: #0000FF;
  --gf65-secondary: #00BFFF;
  --gf65-accent: #E0FFFF;
  --gf65-bg-dark: #141414;
  --gf65-bg-light: #F0FDFF;
  --gf65-text-primary: #F0FDFF;
  --gf65-text-secondary: #00BFFF;
  --gf65-border: rgba(0, 191, 255, 0.3);
  --gf65-shadow: rgba(0, 0, 255, 0.2);
  --gf65-gradient: linear-gradient(135deg, #0000FF 0%, #00BFFF 100%);
  --gf65-font-size-base: 62.5%;
  --gf65-max-width: 430px;
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--gf65-font-size-base);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--gf65-text-primary);
  background: var(--gf65-bg-dark);
  max-width: var(--gf65-max-width);
  margin: 0 auto;
  overflow-x: hidden;
  position: relative;
}

body.paused * {
  animation-play-state: paused !important;
}

/* Container */
.gf65-container {
  width: 100%;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.gf65-wrapper {
  min-height: 100vh;
  padding-bottom: 8rem;
}

/* Header */
.gf65-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--gf65-max-width);
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gf65-border);
  z-index: 1000;
  padding: 1rem 1.5rem;
}

.gf65-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gf65-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.gf65-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  background: var(--gf65-gradient);
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.4rem;
}

.gf65-logo-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gf65-text-primary);
  letter-spacing: -0.05em;
}

.gf65-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.gf65-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  touch-action: manipulation;
}

.gf65-btn-primary {
  background: var(--gf65-gradient);
  color: white;
  box-shadow: 0 0.4rem 1.2rem var(--gf65-shadow);
}

.gf65-btn-primary:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 0.6rem 1.6rem var(--gf65-shadow);
}

.gf65-btn-secondary {
  background: transparent;
  color: var(--gf65-text-secondary);
  border: 0.2rem solid var(--gf65-secondary);
}

.gf65-btn-secondary:hover {
  background: var(--gf65-secondary);
  color: var(--gf65-bg-dark);
}

.gf65-menu-toggle {
  width: 4.4rem;
  height: 4.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  touch-action: manipulation;
}

.gf65-menu-toggle span {
  width: 2.4rem;
  height: 0.2rem;
  background: var(--gf65-text-primary);
  transition: all 0.3s ease;
  border-radius: 0.1rem;
}

.gf65-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.gf65-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.gf65-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

/* Mobile Menu */
.gf65-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--gf65-bg-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

.gf65-mobile-menu.active {
  right: 0;
}

.gf65-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gf65-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.gf65-mobile-nav {
  margin-top: 4rem;
}

.gf65-mobile-nav-link {
  display: block;
  padding: 1.5rem 0;
  color: var(--gf65-text-primary);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  border-bottom: 1px solid var(--gf65-border);
  transition: color 0.3s ease;
}

.gf65-mobile-nav-link:hover,
.gf65-mobile-nav-link.active {
  color: var(--gf65-secondary);
}

/* Main Content */
.gf65-main {
  padding-top: 8rem;
  min-height: 100vh;
}

/* Hero Section */
.gf65-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.6rem;
  margin-bottom: 3rem;
}

.gf65-carousel {
  position: relative;
  width: 100%;
  height: 20rem;
  overflow: hidden;
}

.gf65-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.gf65-carousel-slide.active {
  opacity: 1;
}

.gf65-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gf65-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.gf65-carousel-indicator {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gf65-carousel-indicator.active {
  background: white;
  transform: scale(1.2);
}

/* Typography */
.gf65-h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  background: var(--gf65-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gf65-h2 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--gf65-text-primary);
}

.gf65-h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gf65-text-secondary);
}

.gf65-text {
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--gf65-text-primary);
  margin-bottom: 1.5rem;
}

.gf65-text-small {
  font-size: 1.4rem;
  color: var(--gf65-text-secondary);
}

/* Game Grid */
.gf65-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gf65-game-card {
  text-decoration: none;
  transition: transform 0.3s ease;
}

.gf65-game-card:hover {
  transform: translateY(-0.4rem);
}

.gf65-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1.2rem;
  overflow: hidden;
  margin-bottom: 0.8rem;
  box-shadow: 0 0.4rem 1.2rem var(--gf65-shadow);
}

.gf65-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gf65-game-card:hover .gf65-game-icon img {
  transform: scale(1.1);
}

.gf65-game-name {
  font-size: 1.2rem;
  text-align: center;
  color: var(--gf65-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cards */
.gf65-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gf65-border);
  border-radius: 1.6rem;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.gf65-card:hover {
  border-color: var(--gf65-secondary);
  box-shadow: 0 0.4rem 2rem var(--gf65-shadow);
}

/* Lists */
.gf65-list {
  list-style: none;
  padding: 0;
}

.gf65-list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gf65-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gf65-list-item:last-child {
  border-bottom: none;
}

.gf65-list-icon {
  color: var(--gf65-secondary);
  font-size: 2rem;
}

/* Bottom Navigation */
.gf65-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--gf65-max-width);
  height: 6.4rem;
  background: var(--gf65-bg-dark);
  border-top: 1px solid var(--gf65-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0.8rem 0;
}

.gf65-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 5.6rem;
  background: none;
  border: none;
  color: var(--gf65-text-secondary);
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 1.2rem;
  touch-action: manipulation;
}

.gf65-bottom-nav-btn:hover,
.gf65-bottom-nav-btn.active {
  color: var(--gf65-accent);
  transform: translateY(-0.2rem);
}

.gf65-bottom-nav-icon {
  font-size: 2.4rem;
  margin-bottom: 0.2rem;
}

/* Footer */
.gf65-footer {
  background: var(--gf65-bg-dark);
  border-top: 1px solid var(--gf65-border);
  padding: 3rem 0 8rem;
  margin-top: 4rem;
}

.gf65-footer-content {
  margin-bottom: 3rem;
}

.gf65-footer-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--gf65-text-primary);
}

.gf65-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.gf65-footer-link {
  color: var(--gf65-text-secondary);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.gf65-footer-link:hover {
  color: var(--gf65-accent);
}

.gf65-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.gf65-partner {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gf65-partner img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.7);
  transition: filter 0.3s ease;
}

.gf65-partner:hover img {
  filter: brightness(0) invert(1) opacity(1);
}

.gf65-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--gf65-text-secondary);
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gf65-wrapper {
    padding-bottom: 8rem;
  }
}

@media (min-width: 769px) {
  .gf65-bottom-nav {
    display: none;
  }

  .gf65-wrapper {
    padding-bottom: 0;
  }
}

/* Utility Classes */
.gf65-text-center {
  text-align: center;
}

.gf65-mt-1 { margin-top: 1rem; }
.gf65-mt-2 { margin-top: 2rem; }
.gf65-mt-3 { margin-top: 3rem; }
.gf65-mb-1 { margin-bottom: 1rem; }
.gf65-mb-2 { margin-bottom: 2rem; }
.gf65-mb-3 { margin-bottom: 3rem; }

.gf65-hidden {
  display: none !important;
}

.gf65-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animations */
@keyframes gf65-fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gf65-fade-in {
  animation: gf65-fadeIn 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 0.6rem;
}

::-webkit-scrollbar-track {
  background: var(--gf65-bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gf65-secondary);
  border-radius: 0.3rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gf65-primary);
}