/* LakshyaOne — Streak Card Page */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0D0D0D;
  --card:    #141414;
  --surface: #1C1C1C;
  --elevated:#242424;
  --border:  #2A2A2A;
  --border-hi:#383838;
  --text:    #F0F0F0;
  --secondary: #888888;
  --primary: #4E5FC0;
  --primary-hover: #0070E0;
}

body {
  font-family: 'Manrope', -apple-system, "SF Pro Display", BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TOP BAR ── */

.sc-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 54px;
}

.sc-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity .15s;
  width: 80px;
}

.sc-back:hover { opacity: .8; }

.sc-topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}

/* ── MAIN ── */

.sc-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── CANVAS PREVIEW ── */

.sc-preview-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 360px;
  aspect-ratio: 2 / 3;
}

#streak-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.sc-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--card);
  font-size: 13px;
  color: var(--secondary);
}

.sc-loading.hidden { display: none; }

.sc-loading-ring {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: sc-spin .8s linear infinite;
}

@keyframes sc-spin { to { transform: rotate(360deg); } }

/* ── ACTIONS ── */

.sc-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.sc-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background .15s, transform .1s;
}

.sc-btn:active { transform: scale(.97); }
.sc-btn:disabled { opacity: .4; cursor: not-allowed; }
.sc-btn:disabled:active { transform: none; }

.sc-btn-primary {
  background: var(--primary);
  color: #fff;
}

.sc-btn-primary:not(:disabled):hover { background: var(--primary-hover); }

.sc-btn-secondary {
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.sc-btn-secondary:not(:disabled):hover {
  background: var(--surface);
  border-color: var(--border-hi);
}

/* ── HINT ── */

.sc-hint {
  font-size: 13px;
  color: var(--secondary);
  text-align: center;
  line-height: 1.5;
}

/* ── TOAST ── */

.sc-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
}

.sc-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── MOBILE ── */

@media (max-width: 480px) {
  .sc-main { padding: 24px 16px 48px; }
}
