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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px;
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: 20px 0 10px;
}

.header h1 {
  font-size: 24px;
  background: linear-gradient(135deg, #f0c060, #e8a030);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header .sub {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid #2a2a3e;
}

.card h2 {
  font-size: 16px;
  color: #f0c060;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 6px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #f0c060, #e8a030);
  color: #1a1a2e;
}

.btn-secondary {
  background: #2a2a3e;
  color: #e0e0e0;
  border: 1px solid #4a4a5e;
}

.btn-danger {
  background: linear-gradient(135deg, #e06060, #c03030);
  color: #fff;
}

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 1px solid #2a2a3e;
  font-size: 12px;
}

.sb-item { color: #aaa; }
.sb-item span { color: #f0c060; font-weight: bold; }

/* Phase Cards */
.phase-card {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid #2a2a3e;
}

.student-card {
  background: #f5f5f5;
  color: #333;
  border-color: #e0e0e0;
}

.work-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #2196f3;
}

.transfer-card {
  background: linear-gradient(135deg, #1a2a3e, #0a1a2e);
}

.phase-hdr {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.work-card .phase-hdr { color: #e0e0e0; }

.phase-meta {
  font-size: 10px;
  color: #888;
  text-align: center;
  margin: 6px 0;
}

.phase-meta span { color: #4ecdc4; }

/* Resource Display */
.phase-res {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pr-item {
  flex: 1;
  background: #0d0d1a;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  border: 1px solid #2a2a3e;
}

.student-card .pr-item {
  background: #fff;
  border-color: #ddd;
}

.pr-label {
  display: block;
  font-size: 9px;
  color: #888;
  margin-bottom: 2px;
}

.pr-val {
  font-size: 18px;
  font-weight: bold;
  color: #f0c060;
}

.student-card .pr-val { color: #333; }
.student-card .pr-label { color: #999; }

.pr-unit {
  font-size: 10px;
  color: #888;
  margin-left: 2px;
}

/* Job Banner */
.job-banner {
  text-align: center;
  margin-bottom: 8px;
  padding: 8px;
  background: #0d0d1a;
  border-radius: 8px;
}

.w-stage-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 6px;
}

.w-job-title {
  font-size: 14px;
  font-weight: bold;
}

.w-job-salary {
  display: block;
  font-size: 12px;
  color: #4caf50;
  margin-top: 2px;
}

/* Attribute Section */
.attr-section {
  margin-bottom: 8px;
}

.attr-section-title {
  font-size: 10px;
  color: #4ecdc4;
  margin-bottom: 4px;
}

.student-card .attr-section-title { color: #666; }

.c-prof { color: #f0c060 !important; }

/* Mini Attrs */
.mini-attr-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.mini-attr {
  background: #0d0d1a;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.student-card .mini-attr {
  background: #e8e8ef;
}

.mini-attr .ma-name { color: #888; }
.mini-attr .ma-val { color: #4ecdc4; font-weight: bold; }
.student-card .mini-attr .ma-val { color: #333; }
.student-card .mini-attr .ma-name { color: #999; }

/* Option Grid */
.opt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.opt-btn {
  background: #0d0d1a;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: inherit;
  font-size: 12px;
  color: #e0e0e0;
}

.student-card .opt-btn {
  background: #fff;
  border-color: #ddd;
  color: #333;
}

.opt-btn:hover {
  border-color: #f0c060;
  background: #1a1a30;
}

.student-card .opt-btn:hover {
  background: #fffbf0;
}

.ob-icon { display: block; font-size: 20px; margin-bottom: 2px; }
.ob-label { font-weight: bold; }
.ob-cost { display: block; font-size: 10px; color: #888; margin-top: 2px; }

/* Training Section */
.training-section {
  margin-top: 6px;
  border-top: 1px solid #2a2a3e;
  padding-top: 6px;
}

.train-header {
  font-size: 10px;
  color: #4ecdc4;
  margin-bottom: 4px;
}

.train-cost {
  color: #888;
  font-size: 9px;
}

.train-btn {
  display: inline-block;
  width: 19%;
  margin-right: 1%;
  margin-bottom: 4px;
  background: #0d1a2a !important;
  border-color: #1a3a5e !important;
  padding: 6px 2px !important;
  font-size: 10px !important;
}

.train-btn:hover {
  border-color: #2196f3 !important;
  background: #0a2a4a !important;
}

/* Window Entry / Skip Button */
.btn-window-entry {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  background: linear-gradient(135deg, #f0c060, #e8a030);
  color: #1a1a2e;
  transition: all 0.2s;
}

.btn-window-entry:hover { opacity: 0.85; }

.btn-skip {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  transition: all 0.2s;
}

.btn-skip:hover { opacity: 0.85; }

.we-icon { font-size: 18px; }

/* Job Board Grid */
.job-board-hdr {
  text-align: center;
  font-size: 12px;
  color: #4ecdc4;
  font-weight: bold;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #2a2a3e;
}

.job-board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}

.job-card-item {
  background: #1a1a2e;
  border: 1px solid #3a3a5e;
  border-left: 3px solid #4caf50;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  font-size: 10px;
  position: relative;
}

.job-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.job-card-item.matched { opacity: 1; }
.job-card-item.unmatched { opacity: 0.45; }
.job-card-item.unmatched:hover { opacity: 0.7; }

.jc-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: bold;
  margin-bottom: 4px;
}

.jc-title {
  font-size: 11px;
  font-weight: bold;
  margin: 4px 0;
}

.jc-salary {
  color: #4caf50;
  font-weight: bold;
  margin-bottom: 3px;
}

.jc-reqs {
  font-size: 8px;
  color: #888;
  margin-bottom: 4px;
}

.jc-action {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
}

.jc-action.matched { color: #4caf50; }
.jc-action.unmatched { color: #e06060; }

.no-jobs {
  text-align: center;
  padding: 30px 20px;
  color: #888;
  font-size: 13px;
  line-height: 2;
}

/* Log */
.log {
  background: #0d0d1a;
  border-radius: 8px;
  padding: 10px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.6;
}

.log-item {
  padding: 3px 0;
  border-bottom: 1px solid #1a1a2e;
}

.log-item .time {
  color: #666;
  margin-right: 6px;
  font-size: 10px;
}

.log-item.gain { color: #4caf50; }
.log-item.loss { color: #e06060; }
.log-item.info { color: #4ecdc4; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  border: 1px solid #3a3a5e;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 18px;
  color: #f0c060;
  margin-bottom: 12px;
}

.modal .toast {
  font-size: 13px;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 16px;
  padding: 12px;
  background: #0d0d1a;
  border-radius: 8px;
  border-left: 3px solid #f0c060;
}

/* Toast */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f0c060;
  color: #1a1a2e;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  z-index: 200;
  animation: toastIn 0.3s, toastOut 0.3s 2s forwards;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Rank */
.rank-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid #2a2a3e;
  font-size: 13px;
}

.rank-item .rank-num {
  color: #f0c060;
  font-weight: bold;
  width: 24px;
}

.rank-item .rank-name { flex: 1; }

.rank-item .rank-val {
  color: #4caf50;
  font-weight: bold;
}

/* Diagnosis */
.diagnosis { text-align: center; }

.diagnosis .stage-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
}

.diagnosis .main-text {
  font-size: 16px;
  font-weight: bold;
  color: #f0c060;
  margin: 8px 0;
}

.attr-list {
  text-align: left;
  font-size: 12px;
  line-height: 2;
}

/* End Screen */
.end-screen {
  text-align: center;
  padding: 40px 20px;
}

.end-screen .big-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.end-screen .end-title {
  font-size: 22px;
  color: #f0c060;
  margin-bottom: 8px;
}

.end-screen .end-sub {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
  line-height: 1.8;
}
