@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Myanmar:wght@400;700&family=Inter:wght@400;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f8f9fc;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #1a202c;
  --muted: #718096;
  --accent: #3182ce;
  --accent-dark: #2b6cb0;
  --favorite-bg: #fff5f5;
  --favorite-border: #feb2b2;
  --favorite-text: #e53e3e;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans Myanmar', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100%, 600px); /* 手机端优先，限制最大宽度 */
  margin: 0 auto;
  padding: 16px 16px 100px;
}

.hero {
  padding: 12px 0 24px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #2b6cb0 0%, #3182ce 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h2 {
  font-size: 20px;
  font-weight: 700;
}

.subtext,
.detail-subtitle,
.detail-time,
.history-subtitle,
.history-side,
.status-text {
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.composer,
.result-card,
.detail-card {
  padding: 20px;
  margin-bottom: 20px;
}

/* 针对缅甸语字号优化 */
.history-title, 
.result-name, 
h1, 
.recipe-list li {
  font-family: 'Noto Sans Myanmar', sans-serif;
}

.history-title {
  font-size: 20px; /* 缅甸语需要更大字号 */
  line-height: 1.4;
  margin-bottom: 4px;
}

/* Composer Area */
.composer label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 15px;
}

.composer-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="text"] {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  font-size: 16px;
  transition: border-color 0.2s;
  background: #fcfcfc;
}

input[type="text"]:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}

button {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

button:active {
  background: var(--accent-dark);
}

/* Favorites Section */
.favorites-section {
  background: var(--favorite-bg);
  border: 1px solid var(--favorite-border);
  padding: 20px;
  border-radius: 24px;
  margin-bottom: 32px;
}

.favorites-section .section-title h2 {
  color: var(--favorite-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-item {
  border-color: var(--favorite-border);
  background: white;
}

/* List Items */
.history-card-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.history-card-link {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
}

.history-main {
  flex: 1;
  padding-right: 12px;
}

.history-side {
  white-space: nowrap;
}

.delete-btn {
  background: #fff5f5;
  color: #e53e3e;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 12px;
  border: 1px solid #fed7d7;
}

/* Detail Page */
.detail-page .detail-card {
  border-radius: 24px;
}

.recipe-list {
  padding-left: 0;
  list-style: none;
}

.recipe-list li {
  position: relative;
  padding: 12px 0 12px 32px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.6;
}

.recipe-list li:last-child {
  border-bottom: none;
}

.recipe-list li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--accent);
  font-weight: bold;
  font-size: 20px;
}

.ordered li {
  counter-increment: step-counter;
}

.ordered li::before {
  content: counter(step-counter);
  background: var(--accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 14px;
  left: 0;
}

.comment-section textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  background: #fcfcfc;
}

.add-recipe-btn {
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

/* Fixed Bottom Navigation or Floating Action */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--accent);
}

.badge {
  background: var(--line);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.favorites-section .badge {
  background: var(--favorite-text);
  color: white;
}

.chevron {
  font-size: 24px;
  color: var(--line);
  font-weight: 400;
  margin-left: 8px;
}

.favorite-item .chevron {
  color: var(--favorite-border);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-header .icon {
  font-size: 20px;
}

.section-header h2 {
  font-size: 18px;
  margin: 0;
  color: var(--text);
}

.burmese-title {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.tips-card {
  background: #f0fff4;
  border-color: #c6f6d5;
}

.tips-card .section-header h2 {
  color: #2f855a;
}

.tips {
  color: #2f855a;
  font-size: 16px;
  line-height: 1.6;
}

.favorite-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: white;
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.favorite-toggle.active {
  background: var(--favorite-bg);
  border-color: var(--favorite-border);
}

@media (min-width: 700px) {
  .composer-row {
    flex-direction: row;
  }
  .composer-row input { flex: 1; }
  .composer-row button { width: auto; }
}
