/**
 * Main CSS file for phpopular website
 * All classes use v265- prefix to avoid conflicts
 * Mobile-first responsive design with max-width 430px
 */

/* CSS Variables */
:root {
  --v265-primary: #FFF8DC;
  --v265-secondary: #2E4057;  
  --v265-accent: #EEE8AA;
  --v265-success: #00FF00;
  --v265-warning: #FFD700;
  --v265-bg: #2E4057;
  --v265-text: #FFF8DC;
  --v265-text-dark: #2E4057;
  --v265-border: #EEE8AA;
  --v265-shadow: rgba(46, 64, 87, 0.3);
  --v265-overlay: rgba(46, 64, 87, 0.8);
  --v265-radius: 8px;
  --v265-spacing: 1rem;
  --v265-header-height: 60px;
  --v265-bottom-nav-height: 60px;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--v265-text);
  background-color: var(--v265-bg);
  max-width: 430px;
  margin: 0 auto;
  padding-top: var(--v265-header-height);
  padding-bottom: var(--v265-bottom-nav-height);
}

/* Container */
.v265-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--v265-spacing);
}

.v265-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--v265-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: 2.4rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.3; }
h3 { font-size: 1.8rem; line-height: 1.3; }
h4 { font-size: 1.6rem; line-height: 1.4; }
h5 { font-size: 1.4rem; line-height: 1.4; }
h6 { font-size: 1.3rem; line-height: 1.4; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

a {
  color: var(--v265-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--v265-primary);
}

/* Header */
.v265-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--v265-header-height);
  background: var(--v265-bg);
  border-bottom: 1px solid var(--v265-border);
  z-index: 1000;
  box-shadow: 0 2px 10px var(--v265-shadow);
}

.v265-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--v265-spacing);
}

.v265-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--v265-primary);
}

.v265-logo img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.v265-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.v265-menu-toggle {
  background: none;
  border: none;
  color: var(--v265-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--v265-radius);
  transition: background-color 0.3s ease;
}

.v265-menu-toggle:hover {
  background-color: rgba(255, 248, 220, 0.1);
}

/* Buttons */
.v265-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(135deg, var(--v265-warning), #FFA500);
  color: var(--v265-text-dark);
  border: none;
  border-radius: var(--v265-radius);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  justify-content: center;
}

.v265-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  color: var(--v265-text-dark);
}

.v265-btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  min-height: 36px;
}

.v265-btn-secondary {
  background: transparent;
  color: var(--v265-primary);
  border: 2px solid var(--v265-primary);
}

.v265-btn-secondary:hover {
  background: var(--v265-primary);
  color: var(--v265-text-dark);
}

.v265-btn-large {
  padding: 1.2rem 2.4rem;
  font-size: 1.5rem;
  min-height: 52px;
}

/* Mobile Menu */
.v265-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--v265-overlay);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.v265-menu-overlay.v265-active {
  opacity: 1;
  visibility: visible;
}

.v265-mobile-menu {
  position: fixed;
  top: var(--v265-header-height);
  right: -300px;
  width: 280px;
  height: calc(100vh - var(--v265-header-height));
  background: var(--v265-bg);
  border-left: 1px solid var(--v265-border);
  z-index: 1002;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.v265-mobile-menu.v265-active {
  right: 0;
}

.v265-menu-links {
  list-style: none;
  padding: 2rem 0;
}

.v265-menu-links li {
  margin-bottom: 0.5rem;
}

.v265-menu-links a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 2rem;
  color: var(--v265-text);
  font-size: 1.4rem;
  transition: all 0.3s ease;
  min-height: 48px;
}

.v265-menu-links a:hover {
  background-color: rgba(255, 248, 220, 0.1);
  color: var(--v265-primary);
}

.v265-menu-links i {
  font-size: 1.8rem;
  width: 24px;
}

/* Main Content */
.v265-main {
  flex: 1;
  padding: var(--v265-spacing) 0;
}

.v265-section {
  margin-bottom: 3rem;
  padding: 2rem var(--v265-spacing);
  background: rgba(255, 248, 220, 0.05);
  border-radius: var(--v265-radius);
}

.v265-section-hero {
  background: linear-gradient(135deg, var(--v265-secondary), #1a2d3e);
  color: var(--v265-primary);
  text-align: center;
  padding: 3rem var(--v265-spacing);
}

.v265-section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--v265-primary);
  text-align: center;
}

/* Carousel */
.v265-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--v265-radius);
  margin-bottom: 2rem;
}

.v265-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.v265-slide.v265-active {
  opacity: 1;
}

.v265-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v265-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.v265-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 248, 220, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.v265-indicator.v265-active {
  background: var(--v265-primary);
}

/* Game Grid */
.v265-game-category {
  margin-bottom: 3rem;
}

.v265-category-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--v265-primary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.v265-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.v265-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  border-radius: var(--v265-radius);
  background: rgba(255, 248, 220, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 100px;
}

.v265-game-item:hover {
  background: rgba(255, 248, 220, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--v265-shadow);
}

.v265-game-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  object-fit: cover;
}

.v265-game-name {
  font-size: 1.1rem;
  color: var(--v265-accent);
  font-weight: 500;
  line-height: 1.3;
}

/* Cards */
.v265-card {
  background: rgba(255, 248, 220, 0.08);
  border-radius: var(--v265-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--v265-warning);
}

.v265-card-title {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--v265-primary);
}

.v265-card-content {
  line-height: 1.6;
}

/* FAQ Accordion */
.v265-faq-item {
  background: rgba(255, 248, 220, 0.05);
  border-radius: var(--v265-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.v265-faq-question {
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  color: var(--v265-primary);
  font-size: 1.4rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v265-faq-question:hover {
  background: rgba(255, 248, 220, 0.1);
}

.v265-faq-answer {
  padding: 0 1.5rem 1.5rem;
  display: none;
  color: var(--v265-accent);
  line-height: 1.6;
}

.v265-faq-item.v265-active .v265-faq-answer {
  display: block;
}

/* Bottom Navigation */
.v265-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--v265-bottom-nav-height);
  background: var(--v265-bg);
  border-top: 1px solid var(--v265-border);
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--v265-shadow);
}

.v265-bottom-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  padding: 0 1rem;
}

.v265-bottom-nav a,
.v265-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--v265-accent);
  font-size: 1rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.v265-bottom-nav a:hover,
.v265-bottom-nav button:hover,
.v265-bottom-nav a.v265-active,
.v265-bottom-nav button.v265-active {
  color: var(--v265-warning);
  background: rgba(255, 215, 0, 0.1);
  transform: scale(1.1);
}

.v265-bottom-nav i {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.v265-bottom-nav span {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.v265-footer {
  background: rgba(46, 64, 87, 0.9);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--v265-border);
}

.v265-footer-content {
  text-align: center;
}

.v265-footer-content > p {
  margin-bottom: 2rem;
  color: var(--v265-accent);
  line-height: 1.6;
}

.v265-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.v265-footer-links a {
  color: var(--v265-accent);
  font-size: 1.3rem;
  font-weight: 500;
}

.v265-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem 0;
}

.v265-partners img {
  width: 32px;
  height: 32px;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.v265-partners img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

.v265-copyright {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--v265-border);
  color: var(--v265-accent);
  font-size: 1.2rem;
}

/* Utility Classes */
.v265-text-center { text-align: center; }
.v265-text-left { text-align: left; }
.v265-text-right { text-align: right; }

.v265-mt-1 { margin-top: 1rem; }
.v265-mt-2 { margin-top: 2rem; }
.v265-mt-3 { margin-top: 3rem; }

.v265-mb-1 { margin-bottom: 1rem; }
.v265-mb-2 { margin-bottom: 2rem; }
.v265-mb-3 { margin-bottom: 3rem; }

.v265-p-1 { padding: 1rem; }
.v265-p-2 { padding: 2rem; }
.v265-p-3 { padding: 3rem; }

.v265-hidden { display: none; }
.v265-visible { display: block; }

/* Animations */
.v265-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.v265-animate-in {
  opacity: 1;
  transform: translateY(0);
}

.v265-fade-in {
  animation: v265fadeIn 0.5s ease-in-out;
}

@keyframes v265fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.v265-pulse {
  animation: v265pulse 2s infinite;
}

@keyframes v265pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 320px) {
  .v265-container {
    padding: 0 0.8rem;
  }
  
  .v265-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  
  .v265-game-icon {
    width: 32px;
    height: 32px;
  }
  
  .v265-game-name {
    font-size: 1rem;
  }
}

@media (min-width: 431px) {
  body {
    max-width: 100%;
  }
  
  .v265-header,
  .v265-bottom-nav {
    max-width: 100%;
  }
}