/* Base */
:root {
  --bg: #0b1020;
  --bg-soft: rgba(255, 255, 255, 0.06);
  --text: #e8f1ff;
  --muted: #a7b3c9;
  --brand: #00e5ff;
  --card-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --error: #ff4757;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 20% 0%, #121936 0%, var(--bg) 60%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background canvases */
#starfield, #balloons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* Layout */
.site-header {
  position: relative;
  z-index: 2;
}

main {
  position: relative;
  z-index: 1;
}

.site-footer {
  position: relative;
  z-index: 2;
}

.header-inner {
  padding: 22px 0;
}

.brand .brand-mark {
  font-family: "Orbitron", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--brand);
  font-size: 20px;
}

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
}

main .section { position: relative; z-index: 2; }

h2 {
  font-family: "Orbitron", system-ui, sans-serif;
  letter-spacing: 0.6px;
  font-size: 28px;
  margin: 0 0 14px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  letter-spacing: 0.8px;
  margin: 8px 0 18px 0;
  font-weight: 700;
}

@media (max-width: 640px) {
  .section-title { font-size: 26px; }
}

h3 {
  font-weight: 700;
  margin: 0 0 12px 0;
  font-size: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 18px;
}
/* Hover effect on all cards */
.card { transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,0.45); border-color: rgba(0,229,255,0.28); }

.goals p { color: var(--muted); margin: 8px 0; }

/* Slider (renders) */
.render.card.slider { touch-action: pan-y; display: block; margin: 0; }
.render.card.slider .slides { position: relative; overflow: hidden; border-radius: 10px; }
.render.card.slider .slide { display: none; }
.render.card.slider .slide.is-active { display: block; }
.render.card.slider img { display: block; width: 100%; height: auto; transition: transform 260ms ease; user-select: none; }
.render.card.slider .slides:hover .slide.is-active img { transform: scale(1.03); }
.render.card.slider:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.render.card.slider .badge { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; padding: 6px 8px; border-radius: 6px; }
.slider-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.slider-nav .prev, .slider-nav .next { background: var(--bg-soft); color: var(--text); border: 1px solid var(--card-border); padding: 8px 12px; border-radius: 10px; cursor: pointer; min-width: 36px; min-height: 36px; position: relative; z-index: 4; pointer-events: auto; }
.slider-nav .dots { display: flex; gap: 6px; }
.slider-nav .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--card-border); background: rgba(255,255,255,0.12); }
.slider-nav .dot.is-active { background: var(--brand); border-color: var(--brand); }

/* Streams section */
.section.streams h2 { margin-top: 16px; }
.stream-slider .slide { padding: 6px; }
.stream-card { display: flex; align-items: center; gap: 14px; }
.stream-card .avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, rgba(0,229,255,0.5), rgba(255,255,255,0.12)); display: grid; place-items: center; color: #00131a; font-weight: 800; overflow: hidden; }
.stream-card .avatar .pfp { width: 100%; height: 100%; object-fit: cover; display: block; }
.stream-card .avatar[data-hasimg="false"]::after { content: attr(data-initials); }
.stream-card .meta .name { font-weight: 700; font-size: 16px; }
.stream-card .meta .platform { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stream-card .meta .shout { margin: 6px 0 0 0; color: #eaf6ff; }

/* Stream-specific animations */
.anim-pulse { animation: streamPulse 2.4s ease-in-out infinite; }
.anim-bounce { animation: streamBounce 3s ease-in-out infinite; }
.anim-jitter { animation: streamJitter 1.8s ease-in-out infinite; }
.anim-wobble { animation: streamWobble 2.6s ease-in-out infinite; }
.anim-rotate { animation: streamRotate 6s linear infinite; }
.anim-glow { position: relative; }
.anim-glow::after { content: ""; position: absolute; inset: -6px; border-radius: 16px; background: radial-gradient(120px 40px at var(--x, 50%) var(--y, 50%), rgba(0,229,255,0.15), transparent 60%); pointer-events: none; }

@keyframes streamPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes streamBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes streamJitter { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(1px); } 60% { transform: translateX(-1px); } }
@keyframes streamWobble { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(0.6deg); } }
@keyframes streamRotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(1deg); } }

/* Expenses */
.expenses .card + .card { margin-top: 16px; }

.expenses-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.expenses-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  color: var(--muted);
}

.expenses-table tbody td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}

/* Images inside expenses table cells */
.expenses-table img {
  display: inline-block;
  max-height: 40px;
  max-width: 100px;
  width: auto;
  height: auto;
  vertical-align: middle;
  border-radius: 6px;
}

.expenses-table tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

.expenses-table td:nth-child(2), .expenses-table th:nth-child(2) {
  width: 140px;
  text-align: right;
  white-space: nowrap;
}

.grand-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
}

.grand-inline .label { color: var(--muted); font-weight: 600; letter-spacing: 0.3px; }
.grand-inline .value { font-weight: 800; font-size: 18px; color: #fff; }

.section.timeline .card { margin-bottom: 12px; }
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list .milestone { position: relative; padding-left: 26px; margin: 12px 0; }
.timeline-list .milestone .dot { position: absolute; left: 0; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(0,229,255,0.15); }

.site-footer { margin-top: 30px; }
.footer-inner { padding: 24px 0; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  h2 { font-size: 22px; }
  .grand-inline .value { font-size: 16px; }
}

/* Password Protection Overlay */
.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(1200px 700px at 20% 0%, #121936 0%, var(--bg) 60%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.password-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.password-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  backdrop-filter: blur(20px);
}

.password-title {
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 8px 0;
  letter-spacing: 0.8px;
}

.password-subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.password-input {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 16px;
  font-family: "Inter", system-ui, sans-serif;
  transition: all 0.2s ease;
  outline: none;
}

.password-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.password-input::placeholder {
  color: var(--muted);
}

.password-submit {
  background: linear-gradient(135deg, var(--brand), #00b8d4);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  color: #00131a;
  font-size: 16px;
  font-weight: 700;
  font-family: "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.password-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 229, 255, 0.3);
}

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

.password-error {
  color: var(--error);
  font-size: 14px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: 8px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Hide main content when password overlay is active */
body.password-protected main,
body.password-protected header,
body.password-protected footer {
  display: none;
}

@media (max-width: 480px) {
  .password-container {
    padding: 16px;
  }
  
  .password-card {
    padding: 24px;
  }
  
  .password-title {
    font-size: 24px;
  }
}

