/* demos.css — Section 3: Snake + Section 4: Greeting/Widgets/Prompts */

/* =========================================================
   SNAKE — forest / nature theme
   ========================================================= */
.sec-snake {
  background: #0a160a;
  padding: 100px 20px; position: relative; overflow: hidden;
}
#forestCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.sec-snake .inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.sec-snake .sec-label {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: #4ade80; margin-bottom: 10px; font-weight: 700;
}
.sec-snake h2 {
  font-size: clamp(28px, 5vw, 40px); font-weight: 800;
  color: #e8f5e8; margin-bottom: 8px; line-height: 1.2;
}
.sec-snake .desc { color: #8ab88a; font-size: 16px; line-height: 1.7; margin-bottom: 32px; max-width: 500px; }

.snake-showcase {
  border-radius: 20px; overflow: hidden;
  background: #0f1f0f; border: 2px solid rgba(74,222,128,0.15);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(74,222,128,0.05);
}
.snake-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(74,222,128,0.04);
  border-bottom: 1px solid rgba(74,222,128,0.1);
}
.snake-bar-dots { display: flex; gap: 6px; }
.snake-bar-dots span { width: 10px; height: 10px; border-radius: 50%; }
.snake-bar-dots span:nth-child(1) { background: rgba(239,68,68,0.6); }
.snake-bar-dots span:nth-child(2) { background: rgba(245,158,11,0.6); }
.snake-bar-dots span:nth-child(3) { background: rgba(74,222,128,0.6); }
.snake-bar-url {
  flex: 1; margin-left: 8px; padding: 5px 12px; border-radius: 8px;
  background: rgba(74,222,128,0.04); border: 1px solid rgba(74,222,128,0.1);
  font-size: 12px; color: #6b9b6b; font-family: monospace;
}
.snake-bar-tag {
  padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.2);
}

.snake-body { display: flex; flex-wrap: wrap; }
.snake-main { flex: 1; min-width: 320px; padding: 24px; display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.snake-sidebar {
  width: 280px; padding: 24px; border-left: 1px solid rgba(74,222,128,0.08);
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(0,0,0,0.2);
}
@media (max-width: 800px) {
  .snake-body { flex-direction: column; }
  .snake-sidebar { width: 100%; border-left: none; border-top: 1px solid rgba(74,222,128,0.08); }
  .snake-main { justify-content: center; }
}

.snake-info { max-width: 240px; }
.snake-info h3 { font-size: 20px; font-weight: 800; color: #4ade80; margin-bottom: 6px; }
.snake-score-big {
  font-size: 52px; font-weight: 900; color: #4ade80;
  margin: 8px 0; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(74,222,128,0.3);
}
.snake-hint { font-size: 13px; color: #6b9b6b; line-height: 1.6; margin-bottom: 12px; }
.snake-hint kbd {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.2);
  font-size: 11px; font-family: monospace; color: #8bdb8b; margin: 0 2px;
}
.snake-best { font-size: 12px; color: #4a7a4a; }

.snake-canvas-wrap {
  position: relative; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.snake-canvas-wrap canvas { display: block; }
.s-over {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(10,22,10,0.88); backdrop-filter: blur(6px);
  z-index: 2; border-radius: 12px; gap: 10px;
}
.s-over.hide { display: none; }
.s-over-title { font-size: 22px; font-weight: 800; color: #4ade80; }
.s-over-score { font-size: 14px; color: #6b9b6b; }
.s-btn {
  padding: 14px 28px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #16a34a, #059669);
  color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.3s;
  box-shadow: 0 0 30px rgba(22,163,74,0.3);
}
.s-btn:hover { transform: scale(1.05); box-shadow: 0 0 50px rgba(22,163,74,0.5); }

.s-ctrl { display: none; margin-top: 12px; }
@media (max-width: 768px) {
  .s-ctrl {
    display: grid; grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(2, 50px); gap: 5px; justify-content: center;
  }
}
.s-ctrl button {
  width: 50px; height: 50px; border-radius: 12px;
  border: 1px solid rgba(74,222,128,0.15); background: rgba(74,222,128,0.06);
  color: #4ade80; font-size: 20px; cursor: pointer;
  font-family: inherit; transition: all 0.2s;
}
.s-ctrl button:active { background: #16a34a; color: #fff; transform: scale(0.9); }

/* Snake prompt buttons */
.snake-prompt-list { display: flex; flex-direction: column; gap: 10px; }
.snake-prompt-item {
  display: block; padding: 12px 14px; border-radius: 12px;
  background: rgba(74,222,128,0.05); border: 1px solid rgba(74,222,128,0.12);
  text-decoration: none; color: inherit; transition: all 0.3s; cursor: pointer;
}
.snake-prompt-item:hover { border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); transform: translateX(4px); }
.snake-prompt-label { font-size: 11px; color: #4a7a4a; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; font-weight: 600; }
.snake-prompt-text { font-size: 13px; color: #8bdb8b; line-height: 1.5; }
.snake-prompt-arrow { float: right; color: #4ade80; font-size: 16px; margin-top: -20px; }
.sidebar-title { font-size: 14px; font-weight: 700; color: #4ade80; margin-bottom: 4px; }
.sidebar-desc { font-size: 12px; color: #4a7a4a; margin-bottom: 8px; }

/* =========================================================
   GREETING — warm festive pink/gold
   ========================================================= */
.sec-greeting {
  background: linear-gradient(135deg, #2d1525 0%, #1f0f2a 50%, #1a0f25 100%);
  padding: 100px 20px;
  position: relative; overflow: hidden;
}
.sec-greeting > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.widget-video-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.widget-video-overlay {
  position: absolute; inset: 0; z-index: 0;
  background: rgba(10, 5, 20, 0.35);
  pointer-events: none;
}
.sec-greeting > .inner { position: relative; z-index: 1; }
.sec-greeting .inner { max-width: 1100px; margin: 0 auto; }
.sec-greeting .sec-label {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent4); margin-bottom: 10px; font-weight: 700;
}
.sec-greeting h2 {
  font-size: clamp(28px, 5vw, 40px); font-weight: 800;
  color: #f8e0f0; margin-bottom: 8px;
}
.sec-greeting .desc { color: #b08aa0; font-size: 16px; line-height: 1.7; margin-bottom: 32px; max-width: 500px; }

.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .showcase-grid { grid-template-columns: 1fr; gap: 20px; } }

.browser-window {
  border-radius: 16px; overflow: hidden; transition: transform 0.4s, box-shadow 0.4s;
  display: flex; flex-direction: column;
}
.browser-window:hover { transform: translateY(-4px); }
.browser-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.browser-body > .greeting-inner,
.browser-body > .widgets-row { flex: 1; }

/* Card browser — warm */
.bw-card {
  border: 1px solid rgba(236,72,153,0.15); background: #1a0f1a;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(236,72,153,0.04);
}
.bw-card:hover { box-shadow: 0 25px 70px rgba(0,0,0,0.5), 0 0 60px rgba(236,72,153,0.08); }
.bw-card .browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(236,72,153,0.03);
  border-bottom: 1px solid rgba(236,72,153,0.08);
}
.bw-card .browser-url {
  flex: 1; margin-left: 8px; padding: 5px 12px; border-radius: 8px;
  background: rgba(236,72,153,0.04); border: 1px solid rgba(236,72,153,0.08);
  font-size: 12px; color: #a06080; font-family: monospace;
}
.bw-card .browser-tag {
  padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  background: rgba(236,72,153,0.12); color: var(--accent4); border: 1px solid rgba(236,72,153,0.2);
}

/* Widget browser — cool tech */
.bw-widget {
  border: 1px solid rgba(99,102,241,0.15); background: #0c0c1a;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(99,102,241,0.04);
}
.bw-widget:hover { box-shadow: 0 25px 70px rgba(0,0,0,0.5), 0 0 60px rgba(99,102,241,0.08); }
.bw-widget .browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(99,102,241,0.03);
  border-bottom: 1px solid rgba(99,102,241,0.08);
}
.bw-widget .browser-url {
  flex: 1; margin-left: 8px; padding: 5px 12px; border-radius: 8px;
  background: rgba(99,102,241,0.04); border: 1px solid rgba(99,102,241,0.08);
  font-size: 12px; color: #7070b0; font-family: monospace;
}
.bw-widget .browser-tag {
  padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.2);
}

.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.browser-dots span:nth-child(1) { background: rgba(239,68,68,0.5); }
.browser-dots span:nth-child(2) { background: rgba(245,158,11,0.5); }
.browser-dots span:nth-child(3) { background: rgba(74,222,128,0.5); }

.greeting-inner {
  padding: 48px 24px; text-align: center; position: relative; overflow: hidden;
  min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(236,72,153,0.04), rgba(245,158,11,0.03));
  flex: 1;
}
.greeting-inner > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
}
.greeting-inner > * { position: relative; z-index: 1; }
.greeting-text-anim {
  font-size: 15px; color: #d4a0c0; min-height: 24px; margin-top: 12px;
  transition: opacity 0.4s;
}
.greeting-inner h3 {
  font-size: clamp(26px, 6vw, 42px); font-weight: 900; margin-bottom: 14px;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; background-size: 300% 100%;
  animation: gradShift 4s linear infinite;
  transition: opacity 0.4s;
}
@keyframes gradShift { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.greeting-inner p { color: #a06080; font-size: 14px; margin-bottom: 18px; }
.cbtn {
  padding: 14px 28px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, var(--accent4), var(--accent2));
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.3s; font-family: inherit;
  box-shadow: 0 0 30px rgba(236,72,153,0.2);
}
.cbtn:hover { transform: scale(1.05); box-shadow: 0 0 50px rgba(236,72,153,0.4); }
.confetti { position: absolute; pointer-events: none; animation: cfall 3s ease-out forwards; }
@keyframes cfall { 0% { opacity:1; transform: translateY(0) rotate(0) scale(1); } 100% { opacity:0; transform: translateY(500px) rotate(1080deg) scale(0); } }

/* Widgets */
.widgets-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 16px; overflow: hidden; }
@media (max-width: 800px) { .widgets-row { grid-template-columns: 1fr; gap: 10px; padding: 12px; } }
.widget-item { text-align: center; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; overflow: hidden; background: rgba(12,12,30,0.65); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 12px; border: 1px solid rgba(99,102,241,0.12); }
.widget-label { font-size: 12px; color: #7070b0; margin-top: 10px; font-weight: 500; }

/* Clock */
.clock-wrap { display: inline-block; width: min(140px, 100%); height: min(140px, 36vw); aspect-ratio: 1; position: relative; }
.clock-face { width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(99,102,241,0.3); background: rgba(99,102,241,0.04); position: relative; }
.clock-center { position: absolute; width: 7px; height: 7px; background: #818cf8; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 5; box-shadow: 0 0 8px #818cf8; }
.clock-hand { position: absolute; bottom: 50%; left: 50%; transform-origin: 50% 100%; border-radius: 2px; }
.hand-h { width: 3px; height: 35px; background: #e0e0e0; margin-left: -1.5px; }
.hand-m { width: 2px; height: 46px; background: #818cf8; margin-left: -1px; }
.hand-s { width: 1px; height: 52px; background: var(--accent); margin-left: -0.5px; }
.clock-marks { position: absolute; inset: 0; }
.clock-mark { position: absolute; width: 2px; height: 7px; background: rgba(255,255,255,0.15); top: 5px; left: 50%; margin-left: -1px; transform-origin: 50% 65px; }
.clock-mark.major { height: 10px; width: 2px; background: rgba(255,255,255,0.4); }

/* Weather */
.weather { display: inline-flex; flex-direction: column; align-items: center; }
.weather-icon { font-size: clamp(28px, 8vw, 42px); margin-bottom: 4px; }
.weather-temp { font-size: clamp(24px, 7vw, 36px); font-weight: 800; color: #e0e0e0; }
.weather-city { font-size: 13px; color: #7070b0; }
.weather-desc { font-size: 12px; color: #5050a0; }

/* Calculator */
.calc { display: inline-block; border-radius: 12px; overflow: hidden; border: 1px solid rgba(99,102,241,0.1); background: rgba(99,102,241,0.02); width: 100%; max-width: 230px; box-sizing: border-box; }
.calc-display { padding: 10px 8px 4px; text-align: right; font-size: clamp(18px, 5vw, 26px); font-weight: 700; color: #e0e0e0; border-bottom: 1px solid rgba(99,102,241,0.08); min-height: 40px; overflow: hidden; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 4px; }
.calc-grid button { height: clamp(32px, 8vw, 40px); border: none; border-radius: 8px; font-size: clamp(12px, 3vw, 15px); font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; background: rgba(255,255,255,0.05); color: #e0e0e0; }
.calc-grid button:hover { background: rgba(255,255,255,0.1); }
.calc-grid button:active { transform: scale(0.92); }
.calc-grid .op { background: rgba(99,102,241,0.12); color: #818cf8; }
.calc-grid .eq { background: linear-gradient(135deg, #6366f1, #818cf8); color: #fff; }

/* Demo prompts grid */
.demo-prompts {
  margin-top: 40px; text-align: center;
}
.demo-prompts-title {
  font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px;
}
.demo-prompts-desc {
  font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 20px;
}
.demo-prompts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: left;
}
@media (max-width: 700px) { .demo-prompts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .demo-prompts-grid { grid-template-columns: 1fr; } }

.demo-prompt-card {
  display: block; text-decoration: none; padding: 16px 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; transition: all 0.3s; position: relative;
}
.demo-prompt-card:hover {
  background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3);
  transform: translateY(-2px);
}
.demo-prompt-icon { font-size: 22px; margin-bottom: 8px; }
.demo-prompt-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 6px;
}
.demo-prompt-text { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.demo-prompt-arrow {
  position: absolute; top: 14px; right: 14px;
  font-size: 14px; color: rgba(255,255,255,0.25); transition: color 0.3s;
}
.demo-prompt-card:hover .demo-prompt-arrow { color: var(--accent2); }
