/* ============================================
   CALMIONIX SMP - MAIN STYLESHEET
   Pixel Art Minecraft Theme
   ============================================ */

/* Import Pixel Font */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* CSS Variables */
:root {
  /* Dark Theme (Default) */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --bg-hover: #1a4a7a;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #7a7a7a;
  --accent-primary: #00d4aa;
  --accent-secondary: #00a884;
  --accent-glow: rgba(0, 212, 170, 0.3);
  --border-color: #2d3561;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --online-color: #00ff00;
  --offline-color: #ff4444;
  --warning-color: #ffaa00;
  
  /* Pixel Border */
  --pixel-border: 4px solid var(--border-color);
  --pixel-shadow: 4px 4px 0 var(--shadow-color);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #87CEEB;
  --bg-secondary: #98D8C8;
  --bg-card: #F5DEB3;
  --bg-hover: #E6D5AC;
  --text-primary: #2c3e50;
  --text-secondary: #34495e;
  --text-muted: #7f8c8d;
  --accent-primary: #27ae60;
  --accent-secondary: #229954;
  --accent-glow: rgba(39, 174, 96, 0.3);
  --border-color: #8B4513;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/bg-dark.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.15;
  z-index: -1;
  transition: background-image var(--transition-normal);
}

[data-theme="light"] body::before {
  background-image: url('../assets/images/bg-light.png');
  opacity: 0.25;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Press Start 2P', cursive;
  line-height: 1.4;
  margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: var(--pixel-border);
  z-index: 1000;
  transition: all var(--transition-normal);
}

[data-theme="light"] .navbar {
  background: rgba(135, 206, 235, 0.95);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  image-rendering: pixelated;
}

.navbar-logo span {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--text-primary);
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.navbar-menu a {
  display: block;
  padding: 10px 16px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
  z-index: -1;
}

.navbar-menu a:hover::before,
.navbar-menu a.active::before {
  transform: scaleX(1);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--pixel-shadow);
}

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Theme Toggle */
.theme-toggle {
  width: 60px;
  height: 30px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle::after {
  content: '🌙';
  position: absolute;
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
  font-size: 16px;
  transition: all var(--transition-normal);
}

[data-theme="light"] .theme-toggle::after {
  content: '☀️';
  left: calc(100% - 25px);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 3px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--pixel-shadow);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-secondary);
}

.btn-primary:hover {
  background: var(--accent-secondary);
}

.btn-success {
  background: #27ae60;
  border-color: #229954;
}

.btn-warning {
  background: #f39c12;
  border-color: #e67e22;
}

.btn-danger {
  background: #e74c3c;
  border-color: #c0392b;
}

.btn-block {
  width: 100%;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: var(--pixel-border);
  padding: 20px;
  transition: all var(--transition-normal);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 100%;
  height: 100%;
  background: var(--shadow-color);
  z-index: -1;
  transition: all var(--transition-fast);
}

.card:hover {
  transform: translate(-2px, -2px);
}

.card:hover::after {
  bottom: -6px;
  right: -6px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.card-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.card-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.card-content {
  color: var(--text-secondary);
}

.card-footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid var(--border-color);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-popular {
  background: #3498db;
  color: white;
}

.badge-best {
  background: #f39c12;
  color: white;
}

.badge-premium {
  background: #9b59b6;
  color: white;
}

.badge-elite {
  background: #e74c3c;
  color: white;
}

/* ============================================
   SERVER STATUS
   ============================================ */
.server-status {
  background: var(--bg-card);
  border: var(--pixel-border);
  padding: 30px;
  text-align: center;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-dot.online {
  background: var(--online-color);
  box-shadow: 0 0 10px var(--online-color);
}

.status-dot.offline {
  background: var(--offline-color);
  box-shadow: 0 0 10px var(--offline-color);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.status-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
}

.server-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.server-info-item {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  padding: 15px;
}

.server-info-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.server-info-value {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.ip-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
}

.ip-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--accent-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 50px;
  position: relative;
}

.hero-content {
  max-width: 800px;
}

.hero-logo {
  width: 200px;
  height: 200px;
  margin-bottom: 30px;
  image-rendering: pixelated;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 4px 4px 0 var(--shadow-color);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 80px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid {
  display: grid;
  gap: 25px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--bg-card);
  border: var(--pixel-border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 25px;
  width: 16px;
  height: 16px;
  background: var(--accent-primary);
  border: 3px solid var(--bg-primary);
}

.timeline-year {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.timeline-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* ============================================
   FILTER & SORT
   ============================================ */
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 16px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* ============================================
   PRICE CARD
   ============================================ */
.price-card {
  background: var(--bg-card);
  border: var(--pixel-border);
  padding: 25px;
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.price-card.featured {
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.price-card.featured::before {
  content: '★';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.price-card-header {
  margin-bottom: 20px;
}

.price-card-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  margin-bottom: 15px;
}

.price-card-amount {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.price-card-currency {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-card-features {
  list-style: none;
  text-align: left;
  margin: 20px 0;
}

.price-card-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.price-card-features li::before {
  content: '✓ ';
  color: var(--accent-primary);
}

/* ============================================
   SOCIAL LINKS
   ============================================ */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: var(--bg-card);
  border: var(--pixel-border);
  transition: all var(--transition-normal);
}

.social-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--pixel-shadow);
}

.social-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  image-rendering: pixelated;
  transition: transform var(--transition-fast);
}

.social-card:hover .social-icon {
  transform: scale(1.1);
}

.social-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.social-desc {
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.9rem;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.notification-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  padding: 15px 20px;
  background: var(--bg-card);
  border: var(--pixel-border);
  border-left: 4px solid var(--accent-primary);
  min-width: 280px;
  animation: slideIn 0.3s ease;
}

.notification.error {
  border-left-color: var(--offline-color);
}

.notification.success {
  border-left-color: var(--online-color);
}

.notification.warning {
  border-left-color: var(--warning-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  margin-bottom: 5px;
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  width: 150px;
  height: 150px;
  margin-bottom: 30px;
  image-rendering: pixelated;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.loading-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  animation: blink 1s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: var(--pixel-border);
  padding: 40px 20px;
  text-align: center;
}

.footer-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-primary);
    border-bottom: var(--pixel-border);
    padding: 20px;
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }
  
  .navbar-menu.active {
    transform: translateY(0);
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .price-card.featured {
    transform: none;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .server-info-grid {
    grid-template-columns: 1fr;
  }
  
  .ip-display {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1rem; }
  
  .section {
    padding: 50px 15px;
  }
  
  .hero-logo {
    width: 150px;
    height: 150px;
  }
  
  .navbar-logo span {
    display: none;
  }
}

/* ============================================
   PARTICLES
   ============================================ */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  opacity: 0.5;
  animation: float-particle 10s linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Stars */
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
