/* Base layout */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fafafa;
  color: #1d1d1f;
}

/* Editor styling */
#editor {
  display: block;
  width: 100%;
  max-width: 720px;
  height: 100%;
  margin: 0 auto;

  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: inherit;

  /* Apple-style font stack */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Typography */
  font-size: 20px;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: -0.003em;

  /* Spacing */
  padding: 60px 24px;
  box-sizing: border-box;

  /* Cursor */
  caret-color: #0071e3;

  /* Smooth rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Placeholder text */
#editor::placeholder {
  color: #a1a1a6;
}

/* Text selection */
::selection {
  background: #cce4ff;
}

/* Scrollbar (subtle, Apple-like) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  html, body {
    background: #1c1c1e;
    color: #f5f5f7;
  }

  #editor {
    caret-color: #0a84ff;
  }

  #editor::placeholder {
    color: #6e6e73;
  }

  ::selection {
    background: #2c4a6e;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* MENU PAGE */
.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.menu-container {
  text-align: center;
}

.menu-container h1 {
  font-size: 28px;
  margin-bottom: 40px;
  font-weight: 600;
}

.card {
  display: block;
  width: 260px;
  margin: 12px auto;
  padding: 20px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(0,0,0,0.03);
  transition: 0.2s;
}

.card:hover {
  background: rgba(0,0,0,0.08);
}

/* OCR PAGE */
.ocr-container {
  max-width: 720px;
  margin: 60px auto;
  padding: 20px;
  text-align: center;
}

.ocr-container input {
  margin: 20px 0;
}

.ocr-container button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #0071e3;
  color: white;
  cursor: pointer;
}

#output {
  width: 100%;
  height: 300px;
  margin-top: 20px;
}