/* ========================================
   RobBob Launcher Website - Glass Theme
   ======================================== */

/* CSS Variables - Dark Theme */
:root {
  --bg-1: #0a0b0f;
  --bg-2: #12131a;
  --panel: rgba(20, 24, 35, 0.55);
  --glass: rgba(255,255,255,0.03);
  --glass-hover: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --accent: #a855f7;
  --accent-2: #c084fc;
  --accent-glow: rgba(168,85,247,0.35);
  --green: #22c55e;
  --green-2: #4ade80;
  --green-glow: rgba(34,197,94,0.35);
  --red: #ef4444;
  --yellow: #eab308;
  --muted: #94a3b8;
  --text: #f1f5f9;
  --radius: 6px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --transition: 180ms cubic-bezier(.2,.9,.3,1);
}

/* Light Theme Variables */
body.light {
  --bg-1: #f8fafc;
  --bg-2: #e2e8f0;
  --panel: rgba(255, 255, 255, 0.7);
  --glass: rgba(0,0,0,0.03);
  --glass-hover: rgba(0,0,0,0.05);
  --border: rgba(0,0,0,0.1);
  --muted: #64748b;
  --text: #0f172a;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-1);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ========================================
   Background - Image or Video
   ======================================== */
.background {
  position: fixed;
  inset: 0;
  z-index: -2;
  /* Uncomment below to use background image */
  /* background: url("../img/bg.jpg") center / cover no-repeat; */
  /* filter: blur(14px) brightness(0.8); */
  /* transform: scale(1.1); */
}

/* For video background, use this in HTML:
<video class="bg-video" autoplay muted loop playsinline>
    <source src="video/bg.mp4" type="video/mp4">
</video>
*/
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) brightness(0.7);
  transform: scale(1.1);
  z-index: -2;
}

/* ========================================
   Background Animation (Gradient)
   ======================================== */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 50%, rgba(168,85,247,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(34,197,94,0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(168,85,247,0.1) 0%, transparent 50%),
    var(--bg-1);
  animation: gradientShift 15s ease infinite;
  transition: background 0.3s ease;
}

body.light .bg-gradient {
  background: 
    radial-gradient(circle at 20% 50%, rgba(168,85,247,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(34,197,94,0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(168,85,247,0.05) 0%, transparent 50%),
    var(--bg-1);
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 80px;
  gap: 20px;
}

/* ========================================
   Glass Panel Effect (Enhanced)
   ======================================== */
.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  transition: all var(--transition);
}

body.light .glass-panel {
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

/* ========================================
   Header
   ======================================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  animation: slideDown 0.5s ease;
  gap: 16px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  object-fit: contain;
}

.logo-icon-fallback {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--green));
  border-radius: var(--radius);
  box-shadow: 0 0 20px var(--accent-glow);
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 40px var(--green-glow);
  }
}

.logo-text {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.nav-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.nav-btn:hover {
  background: var(--glass);
  color: var(--text);
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(168,85,247,0.2), rgba(168,85,247,0.1));
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

body.light .theme-toggle .sun-icon {
  display: block;
}

body.light .theme-toggle .moon-icon {
  display: none;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  flex: 1;
  position: relative;
  min-height: auto;
}

.page {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page.active {
  display: block;
  opacity: 1;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 40px 20px;
  padding-bottom: 60px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  animation: fadeIn 0.8s ease;
}

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

.hero-title {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gradient-text {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px var(--accent-glow));
  animation: textGlow 4s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% {
    filter: drop-shadow(0 0 40px var(--accent-glow));
  }
  50% {
    filter: drop-shadow(0 0 50px var(--accent-glow)) drop-shadow(0 0 60px var(--green-glow));
  }
}

.subtitle {
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 8px;
}

.hero-desc {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   Download Section
   ======================================== */
.download-section {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 40px var(--green-glow), 0 0 60px var(--green-glow);
  transition: all 200ms ease;
  animation: pulse 2s ease-in-out infinite;
}

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

.download-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 50px var(--green-glow), 0 0 80px var(--green-glow);
  animation: none;
}

.download-btn:active {
  transform: translateY(0) scale(1);
}

.version-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.version-badge {
  padding: 6px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--accent);
}

/* ========================================
   Features Grid
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

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

.feature-card:hover {
  background: rgba(20, 24, 35, 0.75);
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

body.light .feature-card:hover {
  background: rgba(255, 255, 255, 0.9);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(168,85,247,0.3));
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ========================================
   News Page
   ======================================== */
.news-container {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn 0.6s ease;
}

.page-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  padding: 24px;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease backwards;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }

.news-item:hover {
  background: rgba(20, 24, 35, 0.75);
  border-color: var(--accent);
  transform: translateX(5px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

body.light .news-item:hover {
  background: rgba(255, 255, 255, 0.9);
}

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

.news-badge {
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-badge.new {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #fff;
  box-shadow: 0 0 12px var(--green-glow);
  animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {
  0%, 100% {
    box-shadow: 0 0 12px var(--green-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--green-glow);
  }
}

.news-date {
  font-size: 13px;
  color: var(--muted);
}

.news-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.news-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.news-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ========================================
   Recommended Games Section
   ======================================== */
.recommended-games {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.section-subtitle {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--panel);
  border: 1px solid var(--border);
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.game-card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-1);
  display: block;
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
}

.game-card:hover .game-card-overlay {
  opacity: 1;
}

.game-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.game-card-loading {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(90deg, var(--bg-1) 25%, var(--glass) 50%, var(--bg-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Game Card Container with Admin Comment */
.game-card-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Admin Comment */
.admin-comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  object-fit: contain;
  flex-shrink: 0;
}

.admin-avatar-fallback {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--green));
  border-radius: var(--radius);
}

.admin-comment-content {
  flex: 1;
  min-width: 0;
}

.admin-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.admin-comment-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  word-wrap: break-word;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 16px 24px;
  animation: slideUp 0.5s ease;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.footer .footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

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

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-text {
  font-size: 13px;
  color: var(--muted);
}

.footer-divider {
  color: var(--border);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-text {
  font-size: 13px;
  color: var(--muted);
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
  position: fixed;
  bottom: -100px;
  right: 24px;
  padding: 16px 24px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px var(--green-glow);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  bottom: 24px;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--green);
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.toast-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .container {
    padding: 12px;
    gap: 12px;
  }

  .header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-btn {
    flex: 1;
  }

  .theme-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .gradient-text {
    font-size: 48px;
    letter-spacing: 3px;
  }

  .subtitle {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .download-btn {
    padding: 16px 32px;
    font-size: 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .news-container {
    padding: 24px 12px;
  }

  .page-title {
    font-size: 28px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .toast {
    right: 12px;
    left: 12px;
  }

  .toast.show {
    bottom: 12px;
  }
}

@media (max-width: 480px) {
  .gradient-text {
    font-size: 36px;
  }

  .subtitle {
    font-size: 14px;
    letter-spacing: 3px;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
  }

  .version-info {
    flex-direction: column;
    gap: 8px;
  }
}
