:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --primary: #50C8A3;
  --primary-dark: #3DAF8B;
  --primary-light: #E8F8F2;
  --text-primary: #1A1A1A;
  --text-secondary: #8A8A8A;
  --text-tertiary: #BFBFBF;
  --border: #E8E8E8;
  --warning: #F5A623;
  --warning-bg: #FFF8E8;
  --error: #F56C6C;
  --error-bg: #FEE;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --header-gradient: linear-gradient(135deg, #B8A4F7 0%, #8B5CF6 100%);
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: #E5E5EA;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.phone {
  width: 375px;
  height: 812px;
  background: var(--bg);
  border-radius: 40px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.25);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.status-bar {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface);
}

.status-bar .right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

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

.nav-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-header .back {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 20px;
}

.nav-header .title {
  font-size: 17px;
  font-weight: 600;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-header .right-action {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin: 0 16px 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:disabled {
  background: #B8E5D6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tab-bar {
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 8px;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item .tab-icon {
  font-size: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.badge-hot {
  background: #FFEFEA;
  color: #FF6B4A;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.empty-tip {
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
  padding: 40px 16px;
}

.toast {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
}

.toast.show {
  opacity: 1;
}

/* Component colors */
.subject { color: #2469A5; background: #EAF2FA; }
.predicate { color: #C0392B; background: #FDEDEC; }
.object { color: #B0741A; background: #FEF5E7; }
.adverbial { color: #1A7F5A; background: #E9F7F1; }
.attribute { color: #7A4FB0; background: #F4ECFB; }
.clause { background: #F0F2F4; color: #5F6B7A; }
.sentence { background: #FDF6E5; }

.hidden { display: none !important; }
