:root {
  --bg-primary: #e4e4e9;
  --bg-secondary: #d4d4d9;
  --bg-nav: rgba(228, 228, 233, 0.85);
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0066cc;
  --border-color: #d2d2d7;
  --btn-primary: #1d1d1f;
  
  --table-rim: #1f1f1f;
  --table-inner-rim: #333333;
  --table-felt: radial-gradient(ellipse at center, #1b8552 0%, #0d4629 100%);
  --gold: #dfba45;
  --card-white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.47059;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }

.background-grid {
  position: absolute; top: 0; left: 0; width: 100%; height: 100vh;
  background-image: linear-gradient(rgba(0,0,0,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 40px 40px; z-index: -1;
  -webkit-mask-image: radial-gradient(circle at center 30%, black 0%, transparent 100%);
  mask-image: radial-gradient(circle at center 30%, black 0%, transparent 100%);
}

.navbar {
  position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 5%; background: var(--bg-nav); backdrop-filter: saturate(180%) blur(20px);
  z-index: 100; border-bottom: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 15px 40px rgba(0,0,0,0.08); transition: all 0.3s ease;
}

.logo-container {
  display: flex; align-items: center; gap: 0.6rem; font-size: 1.3rem; font-weight: 600; color: var(--text-main); text-decoration: none;
}
.logo-icon { width: 34px; height: 34px; background: var(--text-main); border-radius: 8px; display: flex; justify-content: center; align-items: center; color: white; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { color: rgba(0,0,0,0.8); text-decoration: none; font-size: 0.9rem; transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.hero { padding: 7rem 5% 4rem; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; }
.hero-badge { background: #f5f5f7; color: var(--text-main); padding: 0.4rem 1rem; border-radius: 40px; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--border-color); margin-bottom: 2rem; }
.hero-title { font-size: clamp(3.5rem, 8vw, 5.5rem); line-height: 1.05; margin-bottom: 1.2rem; max-width: 900px; letter-spacing: -0.04em; }
.gradient-text { background: linear-gradient(135deg, #1d1d1f 0%, #86868b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.4rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 3rem; line-height: 1.4; }

.btn-group { display: flex; gap: 1.5rem; justify-content: center; align-items: center; margin-bottom: 5rem; }
.btn { padding: 1rem 2rem; border-radius: 980px; font-size: 1.05rem; font-weight: 500; text-decoration: none; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.btn-primary { background: #1d1d1f; color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { text-decoration: underline; }

.app-preview-container { width: 100%; max-width: 1200px; margin: 0 auto; perspective: 2000px; }
.app-mockup {
  width: 100%; height: 600px; background: #ffffff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 50px 100px rgba(0,0,0,0.35), 0 15px 40px rgba(0,0,0,0.15); display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,0.08); transform: rotateX(5deg) translateY(0); transition: transform 0.6s ease;
}
.app-mockup:hover { transform: rotateX(0deg) translateY(-10px); }

.mockup-header { height: 48px; background: #fdfdfd; display: flex; align-items: center; padding: 0 1.2rem; gap: 8px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.mockup-dot { width: 12px; height: 12px; border-radius: 50%; }
.mockup-dot.r { background: #ff5f57; border: 1px solid #e0443e; }
.mockup-dot.y { background: #febc2e; border: 1px solid #d89f24; }
.mockup-dot.g { background: #28c840; border: 1px solid #1aab29; }

.mockup-body { flex: 1; background: #f5f5f7; position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; }

/* Proper 6-Max Poker Table Structure */
.poker-table-creative {
  width: 850px; height: 420px;
  background: var(--table-rim); border-radius: 210px;
  padding: 16px; position: relative; z-index: 5;
  box-shadow: 0 40px 80px rgba(0,0,0,0.4), inset 0 2px 10px rgba(255,255,255,0.1);
}
.table-felt {
  width: 100%; height: 100%;
  background: var(--table-felt);
  border-radius: 194px; border: 8px solid var(--table-inner-rim);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.8);
  position: relative;
}
.table-logo-faded {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 4rem; font-weight: 800; color: rgba(255,255,255,0.07); letter-spacing: 0.1em; user-select: none;
}

/* Seats */
.seat { position: absolute; display: flex; flex-direction: column; align-items: center; z-index: 20; width: 120px; }
/* Placing 6 seats cleanly around the felt perimeter */
.seat-1 { bottom: -20px; left: 50%; transform: translateX(-50%); } 
.seat-2 { bottom: 30px; left: -10px; }
.seat-3 { top: 30px; left: -10px; }
.seat-4 { top: -20px; left: 50%; transform: translateX(-50%); }
.seat-5 { top: 30px; right: -10px; }
.seat-6 { bottom: 30px; right: -10px; }

/* Seat UI Elements */
.seat-ui {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  background: rgba(10, 10, 12, 0.9); border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; padding: 4px 14px 4px 4px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.6); position: relative;
}
.active-seat { border-color: #4ade80; box-shadow: 0 0 15px rgba(74, 222, 128, 0.4); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #2f2f2f; border: 2px solid #555; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.active-seat .avatar { background: #1a1a1c; border-color: #4ade80; }
.avatar svg { width: 22px; height: 22px; stroke: #ccc; }
.active-seat .avatar svg { stroke: #4ade80; }
.info { display: flex; flex-direction: column; justify-content: center; }
.info .name { color: #ccc; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1; margin-bottom: 2px; }
.active-seat .info .name { color: #fff; }
.info .stack { color: #fff; font-size: 0.8rem; font-weight: 800; line-height: 1; }

/* Seat Cards Container */
.seat-cards { position: relative; display: flex; gap: -5px; margin-bottom: 6px; }

/* Adjustments by seat so cards project beautifully onto the table felt */
.seat-1 .seat-cards { bottom: 0; left: 20px;}
.seat-2 .seat-cards { bottom: 0; left: 70px; transform: rotate(15deg); }
.seat-3 .seat-cards { top: 50px; left: 70px; position: absolute; transform: rotate(-15deg); }
.seat-4 .seat-cards { top: 50px; position: absolute; left: 20px;}
.seat-5 .seat-cards { top: 50px; right: -10px; position: absolute; transform: rotate(15deg); }
.seat-6 .seat-cards { bottom: 0; right: 70px; transform: rotate(-15deg); }

/* Hole Cards Geometry and Animation */
.s-card {
  width: 44px; height: 60px; background: white; border-radius: 4px; position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(0,0,0,0.1); 
  display: flex; flex-direction: column; padding: 4px; font-weight: 700; font-size: 1rem; color: #111;
  /* They'll overlap slightly in hand */
  margin-left: -15px; 
  /* Animation from center */
  opacity: 0; pointer-events: none;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translate(var(--dealX), var(--dealY)) rotate(180deg) scale(0.4);
}
.s-card:first-child { margin-left: 0; transform: translate(var(--dealX), var(--dealY)) rotate(175deg) scale(0.4); z-index: 1;}
.s-card:last-child { transform: translate(var(--dealX), var(--dealY)) rotate(185deg) scale(0.4); z-index: 2;}

.s-card .spade { font-size: 1.1rem; align-self: flex-end; margin-top: auto; color: #111;}
.s-card .heart { font-size: 1.1rem; align-self: flex-end; margin-top: auto; color: #e0443e;}
.s-card-back { background: repeating-linear-gradient(45deg, #1d1d1f, #1d1d1f 3px, #2a2a2a 3px, #2a2a2a 6px); border: 2px solid #fff; }

/* Set relative vectors to center for deal start points */
.seat-1 .s-card { --dealX: 0px; --dealY: -150px; }
.seat-2 .s-card { --dealX: 250px; --dealY: -100px; }
.seat-3 .s-card { --dealX: 250px; --dealY: 100px; }
.seat-4 .s-card { --dealX: 0px; --dealY: 150px; }
.seat-5 .s-card { --dealX: -250px; --dealY: 100px; }
.seat-6 .s-card { --dealX: -250px; --dealY: -100px; }

/* Dealt State (Triggered by JS scroll) */
.dealt .s-card { opacity: 1; transform: translate(0, 0) rotate(5deg) scale(1); }
.dealt .s-card:first-child { transform: translate(0, 0) rotate(-5deg) scale(1); }

/* Community Cards */
.community-cards {
  display: flex; gap: 8px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10;
}
.com-card {
  width: 55px; height: 75px; background: white; border-radius: 4px; position: relative;
  box-shadow: 0 6px 15px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(0,0,0,0.1); 
  display: flex; flex-direction: column; padding: 4px; font-weight: 700; font-size: 1.2rem; color: #111;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateY(-80px) scale(0.5); opacity: 0; pointer-events: none;
}
.com-card .spade { font-size: 1.3rem; align-self: flex-end; margin-top: auto; color: #111;}
.com-card .heart { font-size: 1.3rem; align-self: flex-end; margin-top: auto; color: #e0443e;}
.dealt .com-card { transform: translateY(0) scale(1); opacity: 1; }

.features { padding: 8rem 5%; background: var(--bg-secondary); }
.features-header { text-align: center; max-width: 700px; margin: 0 auto 5rem; }
.section-title { font-size: 3rem; margin-bottom: 1.5rem; letter-spacing: -0.03em; }
.section-subtitle { font-size: 1.25rem; color: var(--text-muted); line-height: 1.5; }

.features-bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; max-width: 1100px; margin: 0 auto; }
.bento-card {
  background: #ffffff; border-radius: 24px; padding: 3rem; box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04); display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; position: relative;
}
.bento-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }
.bento-large { grid-column: span 2; flex-direction: row; align-items: center; justify-content: space-between; }
.bento-content { z-index: 2; position: relative; }
.bento-large .bento-content { max-width: 50%; }
.bento-card h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.bento-card p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.5; }

.bento-visual { display: flex; justify-content: center; align-items: center; margin-top: 2rem; height: 150px; }
.bento-large .bento-visual { margin-top: 0; width: 40%; height: 250px; }

.pulse-node-wrapper { position: relative; width: 120px; height: 120px; display: flex; justify-content: center; align-items: center; }
.pulse-dot { width: 24px; height: 24px; background: #10b981; border-radius: 50%; position: absolute; z-index: 2; box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
.pulse-ring { width: 100%; height: 100%; position: absolute; border-radius: 50%; border: 2px solid #10b981; opacity: 0; animation: pulse-network 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite; }

.viz-2 svg { width: 60px; height: 60px; color: #1d1d1f; }

.stat-bars { display: flex; align-items: flex-end; gap: 12px; height: 100px; }
.bar { width: 20px; background: #1d1d1f; border-radius: 4px 4px 0 0; animation: bar-rise 1s cubic-bezier(0.1, 0.9, 0.2, 1) forwards; transform-origin: bottom; opacity: 0; }
.bar-1 { height: 40px; background: #d2d2d7; animation-delay: 0.1s; }
.bar-2 { height: 75px; background: var(--accent); animation-delay: 0.3s; }
.bar-3 { height: 100px; background: #10b981; animation-delay: 0.5s; }

.download-section { padding: 10rem 5%; text-align: center; background: #ffffff; }
.download-container { max-width: 700px; margin: 0 auto; }
.download-container h2 { font-size: 4rem; margin-bottom: 1.5rem; line-height: 1.1; letter-spacing: -0.04em; }
.download-container p { color: var(--text-muted); margin-bottom: 3rem; font-size: 1.4rem; }
.btn-large { padding: 1.2rem 3rem; font-size: 1.2rem; }

.os-requirements { margin-top: 2.5rem; color: var(--text-muted); font-size: 0.95rem; display: flex; justify-content: center; align-items: center; gap: 0.8rem; }
.trust-badges { margin-top: 3rem; display: flex; justify-content: center; gap: 2rem; color: #1d1d1f; font-weight: 500; font-size: 0.95rem; }
.trust-badges span { display: flex; align-items: center; gap: 0.5rem; }
.trust-badges svg { color: var(--accent); }

footer { padding: 3rem 5%; background: #f5f5f7; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.8rem; }
.footer-content { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: #424245; text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #1d1d1f; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse-network { 0% { transform: scale(0.2); opacity: 0.9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes bar-rise { 0% { transform: scaleY(0); opacity: 0; } 100% { transform: scaleY(1); opacity: 1; } }

/* Modal Styles (Premium 10/10) */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 10, 12, 0.7); backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  display: flex; justify-content: center; align-items: center; z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
  background: #ffffff; padding: 2rem 2.5rem; text-align: center;
  max-width: 520px; width: 90%; 
  border-radius: 24px; box-shadow: 0 40px 100px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  transform: scale(0.9) translateY(20px); 
  opacity: 0; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); opacity: 1; }

.modal-icon-wrapper { margin-bottom: 1rem; display: flex; justify-content: center; }

.modal-checkmark-svg { width: 56px; height: 56px; border-radius: 50%; display: block; stroke-width: 3; stroke: #fff; stroke-miterlimit: 10; box-shadow: inset 0px 0px 0px #10b981; animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; }
.modal-checkmark-circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 2; stroke-miterlimit: 10; stroke: #10b981; fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.modal-checkmark-check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 40px #10b981; } }

.modal-title { font-size: 1.6rem; color: #1d1d1f; margin-bottom: 0.3rem; letter-spacing: -0.03em; }
.modal-desc { color: #6e6e73; font-size: 1rem; line-height: 1.5; margin-bottom: 1.2rem; }

.password-box { 
  background: #f5f5f7; border: 1px solid #e5e5ea; border-radius: 12px; 
  padding: 0.8rem; margin-bottom: 1.2rem; position: relative;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}
.password-label { display: block; font-size: 0.75rem; color: #86868b; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.2rem; text-transform: uppercase; }
.password-badge { font-family: monospace; font-size: 1.4rem; font-weight: 800; color: #1d1d1fc2; letter-spacing: 0.05em; user-select: all; }

/* Trouble Section inside Modal */
.trouble-container-modal { margin-bottom: 1.5rem; }
.trouble-toggle {
  background: none; border: none; font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.3s ease;
}
.trouble-toggle:hover { color: #1d1d1f; }
.trouble-toggle.active { color: #e0443e; }
.trouble-toggle.active svg { transform: rotate(180deg); color: #e0443e; }
.trouble-toggle svg { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.trouble-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  opacity: 0;
}
.trouble-content.active { grid-template-rows: 1fr; opacity: 1; margin-top: 0.8rem; }
.trouble-content-inner { overflow: hidden; font-size: 0.85rem; color: #86868b; line-height: 1.5; text-align: left; padding: 0 0.5rem; }
.trouble-content-inner strong { color: #e0443e; font-weight: 600; }

.modal-close {
  background: #1d1d1f; color: white; border: none; padding: 0.8rem 0; width: 100%; border-radius: 980px;
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.modal-close:hover { background: #000; }
.modal-close:active { transform: scale(0.98); }

@media (max-width: 900px) {
  .features-bento { grid-template-columns: 1fr; }
  .bento-large { grid-column: span 1; flex-direction: column; text-align: center; }
  .bento-large .bento-content { max-width: 100%; }
}
@media (max-width: 768px) {
  .hero-title { font-size: 3rem; } .hero { padding-top: 6rem; } .nav-links { display: none; }
}
