/* ===== CSS RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors - Black & Red Theme */
  --primary: #dc2626;
  --primary-dark: #991b1b;
  --secondary: #1f1f1f;
  --accent: #ef4444;
  --gradient-primary: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  --gradient-secondary: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-hero: linear-gradient(135deg, #1f1f1f 0%, #dc2626 50%, #ef4444 100%);
  
  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(20px);
  
  /* Dark Theme */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 120px 0;
  
  /* Animation */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Shadows */
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-hard: 0 30px 80px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: white;
}

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

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

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
}

.loading-text {
  font-size: 2.8rem;
  font-weight: 800;
  color: white;
  animation: textShine 2s ease-in-out infinite;
  letter-spacing: -0.02em;
}

.loading-dot {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  margin-left: 8px;
  animation: dotBounce 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px var(--primary);
}

.loading-bar {
  width: 250px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.loading-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: loadingProgress 2s linear forwards;
}

@keyframes textShine {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes loadingProgress {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ===== ABOUT SECTION ===== */
.about {
  position: relative;
  overflow: hidden;
}

/* ===== MODAL VISUAL WIDENING ===== */
.modal-box {
  max-width: 900px !important; /* Much wider on desktop */
  width: 90vw !important;
}

@media (min-width: 1200px) {
  .modal-box {
    max-width: 1000px !important; /* Even wider on large screens */
  }
}

/* ===== USAGE DASHBOARD ===== */
.usage-dashboard {
  padding: 20px 0;
  margin-top: 120px; /* Add space below header */
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--glass-border);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dashboard-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.history-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.history-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.history-btn .btn-icon {
  width: 16px;
  height: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.stat-icon {
  font-size: 1.8rem;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 10px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2px;
}

.stat-trend {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
}

.usage-chart {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
}

.usage-chart h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.chart-container {
  position: relative;
  height: 140px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#usageChart {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
  }
  
  .stat-number {
    font-size: 1.6rem;
  }
}

/* ===== INTERACTIVE NETWORK BACKGROUND ===== */
.network-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}



/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-smooth);
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  opacity: 0;
  transition: var(--transition-smooth);
}

.header.scrolled::before {
  opacity: 1;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.logo-container {
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.logo-text {
  position: relative;
  z-index: 2;
  transition: var(--transition-smooth);
}

.logo-dot {
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.logo:hover .logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition-smooth);
  overflow: hidden;
}

.nav-link::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateY(100%);
  transition: var(--transition-smooth);
}

.nav-link:hover::before {
  transform: translateY(0);
}

.nav-link:hover {
  color: transparent;
}

/* ===== BUTTONS ===== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.primary-cta {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.5);
}

.secondary-cta {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.secondary-cta:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

.btn-shine {
  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 ease;
}

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

.btn-icon {
  width: 18px;
  height: 18px;
  transition: var(--transition-smooth);
}

.secondary-cta:hover .btn-icon {
  transform: translate(4px, -4px);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  opacity: 0.05;
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  transition: transform 0.3s ease-out;
}

/* Grid animation removed - now controlled by mouse movement */

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  margin-bottom: 30px;
  animation: badgeFloat 3s ease-in-out infinite;
}

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

.badge-icon {
  font-size: 1.2rem;
}

.badge-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 30px;
  overflow: hidden;
}

.title-line {
  display: block;
  overflow: hidden;
}

.word {
  display: inline-block;
  margin-right: 0.3em;
  transform: translateY(100%);
  animation: wordSlideUp 0.8s ease forwards;
}

.word.highlight {
  background: var(--gradient-secondary);
  color: white !important;
  padding: 4px 8px;
  border-radius: 6px;
  position: relative;
  /* Remove the transparent text effect */
  -webkit-text-fill-color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  /* Add a subtle glow effect */
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.word.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-secondary);
  border-radius: 2px;
  animation: underlineGrow 1s ease 0.5s forwards;
  transform: scaleX(0);
  transform-origin: left;
}

@keyframes wordSlideUp {
  to { transform: translateY(0); }
}

@keyframes underlineGrow {
  to { transform: scaleX(1); }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  line-height: 1.6;
}

.text-highlight {
  color: var(--accent);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ===== HERO VISUAL ===== */
.hero-visual {
  position: relative;
  height: 600px;
}

/* ===== POKER SHOWCASE ===== */
.poker-showcase {
  position: absolute;
  width: 100%;
  height: 100%;
  top: -20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  perspective: 1200px;
  z-index: 5;
  gap: 20px;
}

.poker-card {
  position: absolute;
  width: 120px;
  height: 180px;
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  transition: var(--transition-smooth);
  animation: pokerFloat 8s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
  /* Assicura posizione iniziale corretta */
  animation-fill-mode: both;
}

/* PRIMA CARTA - Winner esempio (NORMALE, NON OBLIQUA) */
.poker-card:nth-child(1) {
  left: -10px;
  top: 30px;
  transform: scale(1.25);
  z-index: 15;
  animation-delay: 0s;
  box-shadow: 
    0 30px 60px rgba(220, 38, 38, 0.5),
    0 0 40px rgba(220, 38, 38, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* SECONDA CARTA - ♥ K ANCORA PIÙ A SINISTRA */
.poker-card:nth-child(2) {
  left: 50px;
  top: 90px;
  transform: rotateY(-1deg) rotateZ(0deg) scale(1.0);
  z-index: 12;
  animation-delay: 1s;
}

/* TERZA CARTA - SPOSTATA A DESTRA */
.poker-card:nth-child(3) {
  right: 70px;
  top: 150px;
  transform: rotateY(1deg) rotateZ(1deg) scale(0.9);
  z-index: 11;
  animation-delay: 2s;
}

/* QUARTA CARTA (♣ J) - SPOSTAMENTO MINIMO */
.poker-card:nth-child(4) {
  right: -67px;
  top: 180px;
  transform: rotateY(3deg) rotateZ(1deg) scale(0.8);
  z-index: 10;
  animation: pokerFloat 8s ease-in-out infinite;
  animation-delay: 0.5s;
  opacity: 0.85;
}

.winner-card {
  background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
  border: 3px solid var(--primary);
  position: relative;
  overflow: hidden;
}



.winner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.05;
  z-index: -1;
}

.winner-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.1;
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(1.1); }
}

.normal-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.card-suit {
  font-size: 2.5rem;
  font-weight: bold;
  color: #374151;
  line-height: 1;
}

.card-suit.red {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.card-rank {
  font-size: 1.8rem;
  font-weight: 900;
  color: #111827;
  line-height: 1;
  margin: 8px 0;
}

.winner-card .card-rank {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

.card-label {
  text-align: center;
  margin-top: auto;
}

.rank-text {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.winner-card .rank-text {
  color: var(--primary);
  font-size: 0.65rem;
  text-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
  animation: rankPulse 2s ease-in-out infinite;
}

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

.winner-card .rank-text {
  color: var(--primary);
}

.rank-desc {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  color: #9ca3af;
  margin-top: 2px;
}

.winner-card .rank-desc {
  color: var(--primary-dark);
  font-weight: 700;
}

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

/* Enhanced floating for winner card */
.winner-card {
  animation: winnerFloat 6s ease-in-out infinite;
}

@keyframes winnerFloat {
  0%, 100% { 
    transform: scale(1.25) translateY(0);
  }
  25% { 
    transform: scale(1.25) translateY(-8px);
  }
  50% { 
    transform: scale(1.28) translateY(-5px);
  }
  75% { 
    transform: scale(1.25) translateY(-12px);
  }
}

.poker-card:hover {
  transform: translateY(-20px) scale(1.08);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.winner-card:hover {
  box-shadow: 
    0 30px 60px rgba(220, 38, 38, 0.6),
    0 0 40px rgba(220, 38, 38, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.code-preview {
  position: absolute;
  top: 80%;
  right: 50px;
  transform: translateY(-50%);
  width: 300px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--glass-border);
  z-index: 8;
}

.code-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--glass-border);
}

.window-controls {
  display: flex;
  gap: 6px;
  margin-right: 12px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.red { background: #ff5f57; }
.control.yellow { background: #ffbd2e; }
.control.green { background: #28ca42; }

.code-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.code-content {
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}

.code-line {
  margin-bottom: 4px;
  animation: typeWriter 0.5s ease forwards;
  opacity: 0;
}

.code-line:nth-child(1) { animation-delay: 1s; }
.code-line:nth-child(2) { animation-delay: 1.5s; }
.code-line:nth-child(3) { animation-delay: 2s; }
.code-line:nth-child(4) { animation-delay: 2.5s; }

@keyframes typeWriter {
  to { opacity: 1; }
}

.code-comment { color: #6b7280; }
.code-keyword { color: #f59e0b; }
.code-function { color: #10b981; }
.code-string { color: #ef4444; }

/* Force Python widget visibility on all mobile devices */
@media (max-width: 768px) {
  .hero-visual .code-preview {
    display: block !important;
    position: relative !important;
    top: -500px !important;
    right: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin: 0 auto -400px !important;
    width: 90% !important;
    max-width: 350px !important;
  }
  
  .hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  animation: indicatorBounce 2s ease-in-out infinite;
}

@keyframes indicatorBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: wheelMove 2s ease-in-out infinite;
}

@keyframes wheelMove {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

.scroll-text {
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== SECTIONS ===== */
section {
  padding: var(--section-padding);
  position: relative;
}

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

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.about .section-title {
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about .section-title::selection {
  background: rgba(220, 38, 38, 0.3);
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SERVICES SECTION ===== */
.services {
  background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 26, 0.5) 100%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.service-card {
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}

.service-card:hover::before {
  opacity: 0.05;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-medium);
}

.service-icon {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 20px;
  opacity: 0.1;
  transition: var(--transition-smooth);
}

.service-card:hover .icon-bg {
  opacity: 0.2;
  transform: scale(1.1) rotate(5deg);
}

.icon {
  font-size: 2.5rem;
  position: relative;
  z-index: 2;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.service-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.stat {
  text-align: center;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.stat:hover {
  transform: translateY(-4px);
  background: var(--bg-tertiary);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
}

.stat-unit {
    font-size: 1.5rem;
  font-weight: 700;
  color: #6b7280;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.content-factory {
  max-width: 100%;
  position: relative;
}

.factory-header {
  text-align: center;
  margin-bottom: 40px;
}

.factory-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.factory-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  opacity: 0.8;
}

.factory-visualization {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 40px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.pipeline-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.input-section {
  align-items: center;
  padding-left: 10px;
}

.output-section {
  align-items: center;
  padding-right: 10px;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.input-items, .output-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.input-item, .output-item {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  animation: itemPulse 2s ease-in-out infinite;
}

.conveyor-belt {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, 
    rgba(220, 38, 38, 0.3) 0%, 
    rgba(220, 38, 38, 0.6) 50%, 
    rgba(220, 38, 38, 0.3) 100%
  );
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.conveyor-belt::after {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  width: 20px;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  animation: conveyorMove 2s linear infinite;
}

.ai-brain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.brain-core {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, 
    rgba(220, 38, 38, 0.2) 0%, 
    rgba(220, 38, 38, 0.05) 70%, 
    transparent 100%
  );
  border: 2px solid rgba(220, 38, 38, 0.4);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: brainPulse 3s ease-in-out infinite;
}

.neural-network {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.neuron {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: neuronFire 1.5s ease-in-out infinite;
}

.neuron:nth-child(1) { animation-delay: 0s; }
.neuron:nth-child(2) { animation-delay: 0.2s; }
.neuron:nth-child(3) { animation-delay: 0.4s; }
.neuron:nth-child(4) { animation-delay: 0.6s; }
.neuron:nth-child(5) { animation-delay: 0.8s; }
.neuron:nth-child(6) { animation-delay: 1s; }

.processing-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}



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

@keyframes conveyorMove {
  0% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(80px);
  }
}

@keyframes conveyorMoveMobile {
  0% {
    transform: translateX(-15px);
  }
  100% {
    transform: translateX(50px);
  }
}

@keyframes brainPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.6);
    transform: scale(1.05);
  }
}

@keyframes neuronFire {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary);
  }
}

/* Mobile Optimization for Content Factory */
@media (max-width: 768px) {
  .factory-visualization {
    flex-direction: column;
    padding: 20px;
    gap: 30px;
  }
  
  .pipeline-section {
    width: 100%;
    align-items: center !important;
    padding: 0 !important;
  }
  
  .input-section, .output-section {
    padding: 0;
  }
  
  .input-items, .output-items {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .input-item, .output-item {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  .conveyor-belt {
    width: 50px;
    height: 3px;
    margin: 15px 0;
  }
  
  .conveyor-belt::after {
    width: 15px;
    animation: conveyorMoveMobile 1.5s linear infinite;
  }
  
  .brain-core {
    width: 80px;
    height: 80px;
  }
  
  .neural-network {
    gap: 4px;
    margin-bottom: 4px;
  }
  
  .neuron {
    width: 5px;
    height: 5px;
  }
  
  .processing-text {
    font-size: 0.6rem;
  }
  
  .section-label {
    font-size: 0.7rem;
    margin-bottom: 10px;
  }
  
  .factory-title {
    font-size: 1.8rem;
  }
  
  .factory-subtitle {
    font-size: 0.9rem;
  }
}



/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
  margin: 20px;
}

.modal-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  position: relative;
  transform: translateY(30px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-header {
  text-align: center;
  margin-bottom: 2rem;
}



.modal-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.modal-box {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 2px solid var(--primary);
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  position: relative;
  transform: scale(0.9) translateY(30px);
  transition: all 0.3s ease;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(220, 38, 38, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.modal-header {
  text-align: center;
  padding: 40px 40px 20px;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  margin: 0;
  line-height: 1.5;
}

.modal-form {
  padding: 30px 40px 40px;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px 16px;
  color: white;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  width: 100%;
  background: var(--gradient-primary);
  border: none;
  border-radius: 8px;
  padding: 16px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

.form-submit:active {
  transform: translateY(0);
}

/* ===== FORM ===== */
.form-group {
  position: relative;
  margin-bottom: 28px;
  overflow: hidden;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 18px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.form-group label {
  position: absolute;
  top: 16px;
  left: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
  top: -8px;
  font-size: 0.8rem;
  color: var(--primary);
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.form-group input:focus ~ .input-line,
.form-group textarea:focus ~ .input-line {
  width: 100%;
  left: 0;
  transform: translateX(0);
}

.contact-form .cta-btn {
  width: 100%;
  justify-content: center;
  margin-top: 32px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  }

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
} 

.footer-links {
  display: flex;
  gap: 60px;
}

.link-group h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.link-group a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: var(--transition-smooth);
}

.link-group a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  :root {
    --container-width: 900px;
    --section-padding: 80px 0;
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .nav-list {
    gap: 20px;
  }
  
  .hero-cta {
  flex-direction: column;
    align-items: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .poker-showcase {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
  }
  
  .poker-card {
    position: relative !important;
    transform: none !important;
    width: 100px;
    height: 150px;
    margin: 5px;
  }
  
  .poker-card:nth-child(1),
  .poker-card:nth-child(2),
  .poker-card:nth-child(3),
  .poker-card:nth-child(4) {
    transform: none !important;
    position: relative !important;
  }
  
  .code-preview {
    position: relative;
    transform: none;
    margin-top: 40px;
    width: 100%;
    max-width: 350px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero {
    padding: 80px 0;
  }
  
  .service-card,
  .modal-content {
    padding: 24px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-list {
    display: none;
  }
}

/* ===== SYMBOL EFFECTS ===== */
.stat-unit {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-suit {
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.3));
}

.card-suit.red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(220, 38, 38, 0.4));
}

/* Enhanced gradient symbols */
.symbol-enhanced {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.3));
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }

/* Hide on desktop utility class */
@media (min-width: 769px) {
  .hide-on-desktop {
    display: none !important;
  }
}

/* ===== AOS ANIMATIONS ===== */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== TECH PROGRESS BARS ANIMATION ===== */
.tech-progress[data-width="95%"].animate { width: 95%; }
.tech-progress[data-width="90%"].animate { width: 90%; }
.tech-progress[data-width="98%"].animate { width: 98%; }
.tech-progress[data-width="92%"].animate { width: 92%; }

/* ===== COUNTER ANIMATION ===== */
.stat-number.counting {
  animation: countUp 2s ease forwards;
}

/* ===== STATS ASTERISKS & DISCLAIMER ===== */
.stat-asterisk {
  font-size: 0.7rem;
  color: #9ca3af;
  opacity: 0.7;
  vertical-align: super;
  margin-left: 2px;
  font-weight: 400;
}

.stats-disclaimer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-disclaimer p {
  font-size: 0.7rem;
  color: #9ca3af;
  opacity: 0.8;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 400;
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */

/* Mobile First - Base styles for mobile devices */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
    --container-width: 100%;
  }

  html {
    font-size: 14px;
  }

  .container {
    padding: 0 16px;
  }

  /* Header Mobile */
  .header {
    padding: 15px 0;
  }

  .header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
  }

  /* Hide mobile menu toggle on desktop */
  @media (min-width: 769px) {
    .mobile-menu-toggle,
    .mobile-menu-toggle#mobileMenuToggle,
    button.mobile-menu-toggle,
    .header .mobile-menu-toggle {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      pointer-events: none !important;
      width: 0 !important;
      height: 0 !important;
      overflow: hidden !important;
    }
  }

  .hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
    transform-origin: center;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Mobile Navigation */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: var(--transition-smooth);
    z-index: 1000;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  .nav-link {
    font-size: 1.2rem;
    font-weight: 600;
  }

  /* Hide CTA button on mobile */
  .header .cta-btn {
    display: none;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-list {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .cta-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  /* Hero Section Mobile */
  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .hero-content {
    text-align: center;
    max-width: 90%;
    margin: 0 auto;
    z-index: 10;
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    margin-bottom: 30px;
    opacity: 0.9;
  }

  .hero-cta {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .hero-cta .cta-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Hero Visual Mobile */
  .hero-visual {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
  }

  /* Hide poker cards on mobile */
  .poker-showcase {
    display: none !important;
  }

  /* Center and optimize Python widget for mobile */
  .code-preview {
    display: block !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
  }

  .code-header {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .window-controls {
    gap: 6px;
  }

  .control {
    width: 10px;
    height: 10px;
  }

  .code-content {
    display: block !important;
    font-size: 0.8rem;
    padding: 16px;
    background: var(--bg-tertiary);
    line-height: 1.6;
    color: var(--text-primary);
  }

  .code-line {
    display: block !important;
    margin-bottom: 4px;
    color: var(--text-primary);
  }

  .code-keyword {
    color: #ff6b6b;
  }

  .code-function {
    color: #4ecdc4;
  }

  .code-string {
    color: #95e1d3;
  }

  .code-comment {
    color: var(--text-secondary);
  }

  /* Services Section Mobile */
  .services {
    padding: var(--section-padding);
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 25px 20px;
  }

  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .service-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .service-description {
    font-size: 0.9rem;
  }

  /* Modal Mobile */
  .modal-container {
    margin: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
  }

  .modal-content {
    padding: 30px 20px;
  }

  .modal-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .modal-subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-input,
  .form-textarea {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .form-textarea {
    min-height: 100px;
  }

  /* Floating Shapes - Reduce on mobile */
  .floating-shapes .shape {
    opacity: 0.3;
  }

  .shape-1,
  .shape-2 {
    display: none;
  }

  /* Loading Screen Mobile */
  .loading-text {
    font-size: 2rem;
  }

  .loading-bar {
    width: 200px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .poker-showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .nav-list {
    gap: 30px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  /* Poker cards remain hidden on small mobile */
  .poker-showcase {
    display: none;
  }

  /* Optimize Python widget for small screens */
  .code-preview {
    display: block !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 auto;
    border-radius: 8px;
    background: var(--bg-secondary);
    width: 100%;
    max-width: 100%;
  }

  .code-content {
    font-size: 0.75rem;
    padding: 12px;
  }

  .code-header {
    padding: 10px 12px;
  }

  .code-title {
    font-size: 0.8rem;
  }

  .header .container {
    gap: 10px;
  }

  .nav-list {
    gap: 15px;
  }

  .modal-container {
    margin: 10px;
    max-width: calc(100vw - 20px);
  }

  .modal-content {
    padding: 25px 15px;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 80px 0 40px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  /* Hide poker cards in landscape mobile too */
  .poker-showcase {
    display: none;
  }

  /* Optimize Python widget for landscape mobile */
  .hero-visual {
    margin-top: 20px;
  }

  .code-preview {
    display: block !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
  }

  .code-content {
    font-size: 0.8rem;
    padding: 14px;
  }

  .code-header {
    padding: 10px 14px;
  }
} 