/* ================================
   FONTES
================================ */
@font-face {
  font-family: 'Azonix Regular';
  src: url('./Azonix.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Handwriting Regular';
  src: url('./Handwriting.woff') format('woff');
  font-display: swap;
}

/* ================================
   TOKENS
================================ */
:root {
  --bg: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;

  --primary: #22c55e;
  --accent: #4ade80;

  --font-main: 'Handwriting Regular', sans-serif;
  --font-display: 'Azonix Regular', sans-serif;
  --font-ui: 'Inter', sans-serif;
}

/* ================================
   RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================================
   BASE GLOBAL
================================ */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);

  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.4;
}

/* ================================
   COMPONENTES (SEM LAYOUT)
================================ */
.icon {
  --icon-color: var(--text);
  color: var(--icon-color);
  opacity: 0.8;
  transition: all 0.2s ease;
}

.icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

.icon.instagram { --icon-color: #e11d48; }
.icon.github { --icon-color: #7c3aed; }

.logo {
  width: 60px;
  height: 32px;
}

/* SWITCH */
.switch { display: none; }

.switch + label {
  width: 42px;
  height: 22px;
  background: #ddd;
  border-radius: 30px;
  position: relative;
}

.switch + label::after {
  content: "";
  width: 18px;
  height: 18px;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  transition: 0.3s;
}

.switch:checked + label {
  background: var(--primary);
}

.switch:checked + label::after {
  left: 22px;
}

/* LINKS */
.footer-right a {
  color: var(--primary);
  text-decoration: none;
  margin-left: 4px;
  position: relative;
}

.footer-right a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.footer-right a:hover::after {
  width: 100%;
}

/* DARK MODE */
.night-mode {
  --bg: #212529;
}

:root:not(.night-mode) {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
}

/* ================================
   PROGRESS
================================ */
.progress {
  width: 100%;
  max-width: 400px;
  margin-top: 30px;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 0.6s ease;
}

#progress-text {
  font-size: 12px;
  opacity: 0.6;
  display: block;
  margin-top: 5px;
  font-family: var(--font-ui);
}

/* ================================
   FRASE
================================ */
.share-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: transparent;
  border: none;

  color: var(--muted);
  font-size: 14px;
  font-family: var(--font-main);

  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  margin-top: 15px;
  transition: all 0.2s ease;
}

/* frase */
.share-inline .frase {
  margin: 0;
  opacity: 0.8;
}

/* ícone */
.share-inline svg {
  opacity: 0.6;
  transition: all 0.2s ease;
}

/* hover */
.share-inline:hover {
  color: var(--primary);
  background: rgba(255,255,255,0.03);
}

.share-inline:hover svg {
  opacity: 1;
  transform: translateX(2px);
}

/* click */
.share-inline:active {
  transform: scale(0.98);
}

/* ================================
   HABIT COLLAPSE
================================ */
.habit {
  margin-top: 20px;
}

/* header */
.habit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  cursor: pointer;

  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

/* lado direito */
.habit-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* seta */
.habit-arrow {
  transition: transform 0.3s ease;
  font-size: 10px;
  opacity: 0.6;
}

/* conteúdo */
.habit-content {
  overflow: hidden;
  max-height: 200px;
  transition: all 0.3s ease;
}

/* fechado */
.habit.collapsed .habit-content {
  max-height: 0;
  opacity: 0;
}

/* anima seta */
.habit.collapsed .habit-arrow {
  transform: rotate(-90deg);
}

/* grid mantém espaçamento */
.habit-grid {
  margin-top: 12px;
}