:root {
  /* OpenWebUI-inspired color palette */
  --accent: #3b82f6;         /* Bright blue accent color */
  --accent-hover: #2563eb;   /* Darker blue for hover states */
  --accent-light: #60a5fa;   /* Lighter blue for subtle elements */
  --accent-subtle: rgba(59, 130, 246, 0.1); /* Very light blue for backgrounds */
  
  --bg: #141515;             /* Main background color from OpenWebUI */
  --surface: #1f1f1f;        /* Card/section background from OpenWebUI */
  --surface-alt: #0d0d0d;    /* Menu/banner/nav/footer area from OpenWebUI */
  --card-border: #2a2a2a;    /* Subtle border color */
  
  --text: #f9fafb;           /* Main text - bright white */
  --text-soft: #d1d5db;      /* Secondary text - light gray */
  --text-muted: #9ca3af;     /* Muted text - medium gray */
  
  --success: #10b981;        /* Green for success states */
  --warning: #f59e0b;        /* Amber for warnings */
  --error: #ef4444;          /* Red for errors */
  
  /* Layout variables */
  --header-height: 64px;
  --radius: 12px;            /* Slightly larger radius for modern feel */
  --radius-sm: 8px;          /* Small radius for buttons, inputs */
  --radius-lg: 16px;         /* Large radius for hero sections */
  
  /* Effects */
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy effect for hover */
}

/* ==== Core Layout ==== */
html {
  overflow-x: hidden;
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  letter-spacing: -0.011em;
  transition: background 0.3s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.card, .main-section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(75, 85, 99, 0.3);
  padding: 2rem 1.5rem;
  margin-top: 2.3rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover, .main-section:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(75, 85, 99, 0.5);
}

h1, h2, h3 {
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  margin: 0 0 .5em 0;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

p {
  margin: 0 0 1.2em 0;
}

main {
  flex: 1;
  padding-bottom: 2rem;
}

/* Subtle gradient background effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 70%),
              radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.05), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
/* ==== Header ==== */
.site-header {
  background: rgba(13, 13, 13, 0.8); /* Semi-transparent background using OpenWebUI color */
  backdrop-filter: blur(10px); /* Frosted glass effect */
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(42, 42, 42, 0.5);
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 100;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.site-header:hover {
  background: rgba(13, 13, 13, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-flex {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 2rem;
  box-sizing: border-box;
  position: relative;
}

.logo a {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--accent-light);
  text-decoration: none;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.logo a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.logo a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Navigation styles - updated for outside header placement */
.main-nav {
  position: absolute;
  top: 0;
  right: 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 1000; /* Same as header to appear alongside it */
}

/* Desktop navigation positioning */
@media (min-width: 769px) {
  .main-nav {
    position: absolute;
    top: 0;
    right: 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: transparent;
    box-shadow: none;
    border: none;
    width: auto;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

.main-nav ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  outline: none;
  transition: color var(--transition), border-color var(--transition), transform 0.15s ease;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav a[aria-current="page"] {
  color: var(--accent-light);
  font-weight: 600;
}

.main-nav a[aria-current="page"]::after {
  width: 100%;
}

.main-nav a:hover, .main-nav a:focus {
  color: var(--text);
  transform: translateY(-1px);
}

.main-nav a:hover::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  padding: 0;
  background-color: rgba(59, 130, 246, 0.1);
}

.theme-toggle:hover {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--accent);
  transform: translateY(-2px);
}

.theme-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle .material-icons-round {
  font-size: 1.3rem;
}
/* ==== Games Card Grid ==== */
.games-card-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  margin: 2rem 0 1rem 0;
}
.game-select-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  min-width: 200px;
  max-width: 260px;
  width: 99%;
  padding: 2.1rem 1rem 1.4rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
  cursor: pointer;
}
.game-select-card .material-icons {
  font-size: 2.2rem;
  margin-bottom: .7rem;
  color: var(--accent);
  transition: color 0.15s;
}
.game-select-card .game-card-title {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: .2em;
  letter-spacing: 0;
}
.game-select-card .game-card-desc {
  font-size: .98rem;
  color: var(--text-soft);
  margin-bottom: .2em;
}
.game-select-card:hover, .game-select-card:focus {
  box-shadow: 0 8px 20px rgba(37,99,235,0.12);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.025);
  outline: none;
}
.game-select-card.disabled,
.game-select-card[aria-disabled="true"] {
  opacity: 0.58;
  border-style: dashed;
  background: var(--surface-alt);
  color: var(--text-soft);
  cursor: not-allowed;
  pointer-events: none;
}
/* ==== Footer ==== */
.site-footer {
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  border-top: 1px solid rgba(42, 42, 42, 0.5);
  text-align: center;
  padding: 1.5rem 0;
  font-size: .97rem;
  margin-top: 3.5rem;
  width: 100%;
  box-sizing: border-box;
  left: 0;
  right: 0;
}
.site-footer .container {
  max-width: 1100px;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}
.footer-left {
  text-align: center;
}

/* ==== Responsive ==== */
@media (max-width: 900px) {
  .games-card-grid {
    gap: 1.1rem;
  }
  .game-select-card {
    min-width: 160px;
    max-width: 330px;
  }
  .features {
    flex-direction: column;
    align-items: stretch;
    gap: 1.4rem;
  }
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2.1rem;
    padding: 1.5rem 0.6rem 2.2rem 0.6rem;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-graphic {
    margin: 0 auto;
  }
}
@media (max-width: 800px) {
  .games-card-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
  }
  .card, .main-section {
    padding: 1.2rem 0.8rem;
  }
  .header-flex {
    padding: 0 1rem;
  }
  .container {
    padding: 0 1rem;
  }
}
@media (max-width: 600px) {
  .feature-card {
    margin: 0.5rem 0;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .cta-btn {
    font-size: 1rem;
    padding: 0.75rem 1.4rem;
  }
  .hero-graphic {
    width: 80px;
    height: 80px;
  }
  .feature-icon { font-size: 1.7rem; }
}

/* Fix for zooming and horizontal scrolling issues */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
  }
  
  /* Ensure content doesn't cause horizontal scrolling */
  .container, main.container, section, .hero, .features, .tech-stack-card {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Ensure the header and footer span the full width */
  .site-header, .site-footer {
    width: 100vw;
    max-width: 100vw;
    left: 0;
    right: 0;
  }
}

/* ---- HERO ---- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 3.5rem 2.5rem 3rem 2.5rem;
  background: linear-gradient(to bottom right, var(--surface), rgba(25, 25, 25, 0.9));
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  margin: 3rem 0 2.5rem 0;
  border: 1px solid rgba(75, 85, 99, 0.3);
  position: relative;
  overflow: hidden;
}

/* Add subtle pattern overlay */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  max-width: 520px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(to right, var(--text), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-soft);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.cta-btn {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: linear-gradient(to right, var(--accent), var(--accent-hover));
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  text-decoration: none;
  transition: transform var(--transition-bounce), box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cta-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.7s ease;
}

.cta-btn:hover, .cta-btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  filter: brightness(1.05);
  outline: none;
}

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

/* Robot icon with enhanced styling */
.hero-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--surface-alt), rgba(20, 20, 20, 0.7));
  border-radius: 60px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 
              inset 0 2px 4px rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-graphic::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 65px;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--accent) 25%,
    var(--accent-light) 50%,
    var(--accent) 75%,
    transparent 100%
  );
  z-index: -1;
  opacity: 0.7;
  filter: blur(10px);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.hero-graphic:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3), 
              inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.hero-graphic:hover::after {
  opacity: 0.9;
  filter: blur(15px);
}

.hero-icon {
  font-size: 3.5rem;
  color: var(--accent-light);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease, color 0.3s ease;
}

.hero-graphic:hover .hero-icon {
  transform: scale(1.1);
  color: var(--text);
}

/* ---- FEATURES ---- */
.features {
  display: flex;
  gap: 2rem;
  margin: 3rem 0 2.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-card {
  flex: 1 1 250px;
  min-width: 220px;
  max-width: 350px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem 1.8rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(75, 85, 99, 0.3);
  transition: transform var(--transition-bounce), box-shadow 0.2s ease, border-color 0.2s ease;
  margin: 0 0.6rem;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover, .feature-card:focus-within {
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
  z-index: 1;
  border-color: rgba(75, 85, 99, 0.5);
}

.feature-card:hover::before, .feature-card:focus-within::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  background: var(--accent-subtle);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.2rem auto;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  background: var(--accent);
  color: white;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
  transition: color 0.2s ease;
}

.feature-card:hover h3 {
  color: var(--accent-light);
}

.feature-card p {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---- TECH STACK ---- */
.tech-stack-card {
  margin: 2.5rem auto 3rem auto;
  text-align: center;
  background: linear-gradient(to bottom, var(--surface), rgba(25, 25, 25, 0.9));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(42, 42, 42, 0.5);
  max-width: 700px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.tech-stack-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%233b82f6' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 0;
}

.tech-stack-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.tech-stack-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 3px;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  border-radius: 3px;
}

.tech-stack {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.tech-stack li {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.6);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid rgba(42, 42, 42, 0.5);
  min-width: 60px;
  height: 60px;
}

.tech-stack li:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
}

.tech-stack img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: none;
  margin: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.tech-stack li:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

/* Nice on mobile */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2.1rem;
    padding: 1.3rem 1rem 2rem 1rem;
  }
  .hero-content {
    max-width: 100%;
  }
  .features {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    margin: 1.5rem 0;
  }
}
@media (max-width: 700px) {
  .card { margin-top: 1.1rem; }
  .tech-stack-card { max-width: none; }
  .container { padding: 0 0.5rem; }
}
