@import url("/web/fonts.css");
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Inter:wght@400;600&display=swap');

/* TilanGo design system v6 - Final */
:root {
  --bg: #0a0b0d;
  --panel: rgba(22, 24, 26, 0.7);
  --surface-raised: #1F2226;
  --line: #2D3136;
  --line-strong: #44494f;
  --ink: #FFFFFF;
  --mute: #A0A5AB;
  --primary: #CCFF00;
  --on-primary: #0a0b0d;
  --primary-hover: #d4ff33;
  --primary-text: #CCFF00;
  --secure: #34D399;
  --notice: #F5B454;
  --bad: #F0707A;
  
  --font: "Montserrat", "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-sm: 6px; --r: 12px; --r-lg: 20px;
  --shadow-glow: 0 0 30px rgba(204, 255, 0, 0.15);
  --shadow-card: 0 20px 40px rgba(0,0,0,0.5);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary);
  
  color-scheme: dark;
  font-family: var(--font);
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); margin: 0; line-height: 1.6; overflow-x: hidden; }
a { color: var(--primary-text); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: rgba(204, 255, 0, 0.3); }

h1, h2, h3 { letter-spacing: -0.03em; font-weight: 800; }
code, kbd, samp, pre, .mono, .mgr { font-family: var(--mono); }

button, .btn { 
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font: inherit; font-weight: 700; padding: 14px 28px; border-radius: 50px; 
  border: 1px solid transparent; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
button.primary, .btn.primary { 
  background: var(--primary); color: var(--on-primary); 
  box-shadow: 0 4px 15px rgba(204, 255, 0, 0.3);
}
button.primary:hover, .btn.primary:hover { 
  background: var(--primary-hover); transform: translateY(-2px); 
  box-shadow: 0 8px 25px rgba(204, 255, 0, 0.5);
}
.btn.ghost { 
  background: rgba(255,255,255,0.03); border-color: var(--line-strong); color: var(--ink); 
  backdrop-filter: blur(10px);
}
.btn.ghost:hover { 
  background: rgba(255,255,255,0.08); border-color: var(--primary); color: var(--primary);
}

.nav { 
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100; 
  display: flex; align-items: center; justify-content: space-between; 
  padding: var(--s4) var(--s7); 
  background: rgba(10, 11, 13, 0.7); backdrop-filter: blur(20px); 
  border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.5rem; cursor: pointer; font-weight: 800; }
.brand:hover { color: var(--ink); }

.tg-wordmark b { color: var(--primary); }
.tg-mark { display: inline-flex; align-items: center; justify-content: center; filter: drop-shadow(0 0 10px rgba(204,255,0,0.3)); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.badge.live { background: rgba(52, 211, 153, 0.15); color: var(--secure); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge.dev { background: rgba(204, 255, 0, 0.1); color: var(--primary); border: 1px solid rgba(204, 255, 0, 0.3); }

/* Glass Card Base */
.glass-card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.1s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.glass-card:hover {
  border-color: rgba(204, 255, 0, 0.5);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6), var(--shadow-glow);
}
.glass-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0; transition: opacity 0.5s; pointer-events: none; z-index: 1;
}
.glass-card:hover::before { opacity: 1; }

/* Sidebar Styles */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); z-index: 99998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar { position: fixed; top: 0; left: 0; width: 320px; max-width: 85vw; height: 100vh; height: 100dvh; background: #0d0f12; border-right: 1px solid var(--line); z-index: 99999; transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; overflow-y: auto; box-shadow: 10px 0 50px rgba(0,0,0,0.8); }
.sidebar.open { transform: translateX(0); }
.sb-header { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sb-header .brand { pointer-events: none; }
.sb-close { background: none; border: none; color: var(--mute); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.sb-close:hover { color: var(--primary); }
.sb-content { padding: 24px; flex: 1; }
.sb-section-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin: 24px 0 12px; }
.sb-section-title:first-child { margin-top: 0; }
.sb-link, .sb-module { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--r); color: var(--ink); font-size: 0.95rem; font-weight: 600; transition: all 0.2s; margin-bottom: 4px; cursor: pointer; }
.sb-link:hover, .sb-module:hover { background: rgba(255,255,255,0.05); color: var(--primary); transform: translateX(4px); }
.sb-link svg, .sb-module-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sb-module-content { display: flex; flex-direction: column; gap: 2px; }
.sb-module-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; }
.sb-module-sub { font-size: 0.75rem; color: var(--mute); font-weight: 400; }
.sb-badge { font-size: 0.65rem; padding: 2px 8px; border-radius: 50px; font-weight: 800; }
.sb-badge.available { background: rgba(52, 211, 153, 0.15); color: var(--secure); }
.sb-badge.dev { background: rgba(245, 180, 84, 0.15); color: var(--notice); }
.sb-footer { padding: 24px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-family: var(--mono); color: var(--secure); }
.sb-footer .dot { width: 8px; height: 8px; background: var(--secure); border-radius: 50%; box-shadow: 0 0 10px var(--secure); animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Stars Background Utilities */
#stars-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at bottom, #131822 0%, #0a0b0d 100%); }
#stars { width: 1px; height: 1px; background: transparent; animation: animStar 50s linear infinite; }
#stars:after { content: " "; position: absolute; top: 2000px; width: 1px; height: 1px; background: transparent; }
#stars2 { width: 2px; height: 2px; background: transparent; animation: animStar 100s linear infinite; }
#stars2:after { content: " "; position: absolute; top: 2000px; width: 2px; height: 2px; background: transparent; }
#stars3 { width: 3px; height: 3px; background: transparent; animation: animStar 150s linear infinite; }
#stars3:after { content: " "; position: absolute; top: 2000px; width: 3px; height: 3px; background: transparent; }
@keyframes animStar { from { transform: translateY(0px); } to { transform: translateY(-2000px); } }
