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

:root {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --border: #e0e0e0;
  --text: #111111;
  --text-muted: #666666;
  --accent: #111111;
  --accent-light: #f0f0f0;
  --success: #2d7a2d;
  --danger: #c0392b;
  --warning: #d4840a;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
}

#app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
#sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 16px;
}

#profile {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

#dev-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

#stats-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

#skill-display {
  font-size: 11px;
  color: var(--text-muted);
}

#skill-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text);
}

#nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-btn {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.nav-btn:hover {
  background: var(--accent-light);
  color: var(--text);
}

.nav-btn.active {
  background: var(--accent);
  color: #fff;
}

#time-info {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

#current-project-info {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Main */
#main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.card-title {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s;
}

.btn:hover {
  background: var(--accent-light);
}

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

.btn-primary:hover {
  background: #333;
}

.btn-primary:disabled {
  background: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Develop tab */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.option-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.12s, background 0.12s;
  line-height: 1.4;
}

.option-btn:hover {
  border-color: var(--accent);
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.option-btn .opt-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

/* Work section */
.work-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.work-action-info {
  font-size: 12px;
}

.work-action-label {
  font-weight: 500;
  margin-bottom: 2px;
}

.work-action-desc {
  color: var(--text-muted);
  font-size: 11px;
}

/* Store */
.game-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  background: var(--surface);
}

.game-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--accent-light);
  flex-shrink: 0;
}

.game-info {
  flex: 1;
  min-width: 0;
}

.game-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.game-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.game-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
}

.stat-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 13px;
}

/* Reviews */
.review {
  border-left: 3px solid var(--border);
  padding: 6px 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.review-score {
  font-weight: 700;
  margin-bottom: 2px;
}

.review-text {
  color: var(--text-muted);
}

/* Market */
.trend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.trend-item:last-child {
  border-bottom: none;
}

.trend-hot {
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.trend-cold {
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

/* Notification */
#notification-area {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.notification {
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 260px;
  animation: slideIn 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification.success {
  background: var(--success);
}

.notification.warning {
  background: var(--warning);
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Label */
.label {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--text-muted);
}

.label-success {
  background: #e8f5e9;
  color: var(--success);
}

.label-danger {
  background: #fdecea;
  color: var(--danger);
}

.label-warning {
  background: #fff8e1;
  color: var(--warning);
}

/* Input */
input[type="text"], input[type="number"] {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  width: 100%;
  outline: none;
}

input:focus {
  border-color: var(--accent);
}

select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--surface);
  outline: none;
  cursor: pointer;
}

/* Section title */
.section-title {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

/* Tooltip-like helpers */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
}

.info-row .key {
  color: var(--text-muted);
}

.info-row .val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
}

/* Scroll */
#main::-webkit-scrollbar {
  width: 4px;
}

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

#main::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.2s ease;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.modal {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  animation: fadeIn 0.15s ease;
}

.modal-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Responsive for small screens */
@media (max-width: 480px) {
  #sidebar {
    width: 160px;
    min-width: 160px;
    padding: 12px 8px;
  }
  #main {
    padding: 12px;
  }
}