:root {
  color-scheme: light dark;
  font-family: "Google Sans", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  --bg: #ffffff;
  --text: #202124;
  --placeholder: rgba(32, 33, 36, 0.38);
  --locked-text: rgba(32, 33, 36, 0.5);
  --status-bg: rgba(32, 33, 36, 0.88);
  --status-info: #1a73e8;
  --status-success: #188038;
  --status-error: #d93025;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.viewport {
  flex: 1;
  display: flex;
  padding: 0;
}

#note {
  flex: 1;
  width: 100%;
  min-height: calc(100dvh);
  border: none;
  border-radius: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  font: inherit;
  font-size: 1.08rem;
  line-height: 1.75;
  resize: none;
  outline: none;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

#note::placeholder {
  color: var(--placeholder);
}

#note.is-locked {
  color: var(--locked-text);
  cursor: not-allowed;
}

#status {
  position: fixed;
  bottom: clamp(1.25rem, 3vw, 2rem);
  left: clamp(1.25rem, 3vw, 2rem);
  background: var(--status-bg);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

#status[data-variant="info"] {
  background: rgba(26, 115, 232, 0.92);
}

#status[data-variant="success"] {
  background: rgba(24, 128, 56, 0.92);
}

#status[data-variant="error"] {
  background: rgba(217, 48, 37, 0.92);
}

.font-controls {
  position: fixed;
  bottom: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  gap: 0.5rem;
}

.font-controls button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(32, 33, 36, 0.9);
  color: #fff;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.font-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.font-controls button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.font-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.font-controls .clear-button {
  width: auto;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(217, 48, 37, 0.92);
}

.font-controls .clear-button:hover {
  background: rgba(200, 40, 31, 0.96);
}

.font-controls .clear-button:active {
  background: rgba(180, 32, 26, 0.98);
}

@media (max-width: 768px) {
  .font-controls {
    flex-direction: column;
    right: clamp(0.75rem, 4vw, 1.25rem);
    bottom: clamp(1.5rem, 5vw, 2.5rem);
    gap: 0.4rem;
  }

  #status {
    left: clamp(0.75rem, 4vw, 1.25rem);
    bottom: clamp(0.75rem, 4vw, 1.25rem);
  }

  #note {
    min-height: calc(100dvh);
    padding: clamp(1.25rem, 4vw, 2rem);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e8eaed;
    --placeholder: rgba(232, 234, 237, 0.42);
    --locked-text: rgba(232, 234, 237, 0.6);
  }

  #note {
    background: transparent;
  }

  .font-controls button {
    background: rgba(232, 234, 237, 0.15);
    color: #e8eaed;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  }
}
