/* ================= ROOT ================= */
:root {
--bg: #fdfaf7;
--card: #ffffff;
--text: #2d2d2d;
--accent: #ff8fa3;
--accent-light: #ffd6e0;
--border: #1a1a1a;
--shadow: 4px 4px 0px var(--border);
--font-main: 'Outfit', sans-serif;
--font-hand: 'Patrick Hand', cursive;
}

/* ================= GLOBAL ================= */
* {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}

html, body, #root {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow: hidden;
  
  /* 📱 Mobile Native */
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ================= APP ================= */
.app {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;

  height: 100vh;
  height: 100svh;

  display: flex;
  flex-direction: column;

  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
}

/* ================= HEADER ================= */
.topbar {
padding: 20px 0;
display: flex;
justify-content: space-between;
align-items: center;
}

.logo {
font-family: var(--font-hand);
font-size: 30px;
font-weight: bold;
}

.profile-btn {
width: 42px;
height: 42px;
border: 2px solid var(--border);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: var(--card);
box-shadow: 2px 2px 0 var(--border);
cursor: pointer;
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-btn:active {
transform: scale(0.92);
}

/* ================= CONTENT ================= */
.content {
flex: 1;
overflow-y: auto;

display: flex;
flex-direction: column;

gap: 14px;
padding-bottom: 20px;

scrollbar-width: none;
}

.content::-webkit-scrollbar {
display: none;
}

/* ================= CARD ================= */
.card {
width: 100%;
background: var(--card);

border: 3px solid var(--border);
border-radius: 24px;

padding: 20px;

box-shadow: var(--shadow);

transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:active {
transform: scale(0.97);
}

.card-title {
  font-family: var(--font-hand);
  font-size: 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 12px;
}

.add-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.add-btn:active {
  transform: scale(0.9);
}

/* ================= SUBJECTS ================= */
.subjects {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.sub {
padding: 8px 16px;
border: 2px solid var(--border);
border-radius: 14px;

font-family: var(--font-hand);
font-size: 17px;

cursor: pointer;
background: var(--card);

transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub.active {
background: var(--accent-light);
}

.sub:active {
transform: scale(0.9);
}

/* ================= TIMER ================= */
.timer-big {
font-size: 60px;
text-align: center;
font-family: 'Space Mono', monospace;
font-weight: bold;

padding: 24px 10px;
cursor: pointer;
}

.timer-input {
font-size: 60px;
text-align: center;
font-family: 'Space Mono', monospace;
font-weight: bold;

border: none;
outline: none;
background: transparent;
width: 100%;
}

/* ================= CONTROLS ================= */
.controls {
display: flex;
justify-content: center;
gap: 12px;
margin-top: 4px;
}

.btn {
font-family: var(--font-hand);
font-size: 18px;

padding: 12px 20px;

border: 2px solid var(--border);
border-radius: 14px;

background: var(--card);
cursor: pointer;

box-shadow: 3px 3px 0 var(--border);
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:active {
transform: scale(0.9);
box-shadow: none;
}

.btn-primary {
background: var(--accent);
color: white;
}

/* ================= PET ================= */
.pet {
font-size: 48px;
text-align: center;

margin: 8px 0;

animation: floatSlow 4s ease-in-out infinite;
}

@keyframes floatSlow {
0%,100% { transform: translateY(0); }
50% { transform: translateY(-6px); }
}

/* ================= GOAL ================= */
.card small {
opacity: 0.6;
}

/* ================= STREAK ================= */
.card.text-center {
text-align: center;
}

.card.text-center div {
margin-bottom: 4px;
}

/* ================= FOCUS ================= */
.focus-screen {
position: fixed;
inset: 0;

background: var(--bg);

display: flex;
flex-direction: column;

padding: 30px 16px;

animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}

.focus-header {
display: flex;
justify-content: space-between;
align-items: center;

margin-bottom: 20px;
}

.focus-body {
flex: 1;

display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

gap: 20px;
}

.focus-circle {
width: 220px;
height: 220px;

border: 3px dashed var(--accent);
border-radius: 50%;

display: flex;
align-items: center;
justify-content: center;
}

.focus-time {
font-size: 54px;
font-family: 'Space Mono', monospace;
font-weight: bold;
cursor: pointer;
}

.focus-pet {
font-size: 60px;
}

/* ================= STATS ================= */
/* ================= STATS ================= */
.stats-screen {
  max-width: 500px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.graph {
  display: flex;
  align-items: flex-end;
  height: 180px;
  gap: 12px;
  padding: 10px 0;
  margin-top: 10px;
}

.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bar {
  width: 100%;
  background: var(--accent-light);
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  transition: height 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bar-label {
  font-size: 11px;
  margin-top: 8px;
  font-family: var(--font-hand);
  opacity: 0.7;
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--border);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-title {
  font-family: var(--font-hand);
  font-size: 22px;
  margin-bottom: 16px;
  text-align: center;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  font-family: var(--font-main);
  font-size: 16px;
  margin-bottom: 20px;
  outline: none;
  background: var(--bg);
}

.modal-btns {
  display: flex;
  gap: 12px;
}

.modal-btns button {
  flex: 1;
}

/* ================= INSTALL ================= */
.install-card {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.install-text {
  font-size: 14px;
  opacity: 0.6;
}

/* ================= FOOTER ================= */
.footer {
text-align: center;
font-size: 11px;
opacity: 0.4;
padding: 10px 0;
}

/* ================= TRANSITIONS ================= */
.screen {
animation: slideIn 0.3s ease;
}

@keyframes slideIn {
from {
opacity: 0;
transform: translateX(20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}

/* ================= SMALL DEVICES ================= */
@media (max-width: 400px) {
.timer-big { font-size: 50px; }
.timer-input { font-size: 50px; }
.focus-time { font-size: 46px; }
}