:root {
  --primary: #06c755;
  --primary-dark: #05b04b;
  --secondary: #00b900;
  --text: #1f2a44;
  --text-light: #5f6b7d;
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --border: #e1e4e8;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.user-name {
  font-weight: 600;
  color: var(--text);
}

.btn-logout {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #e8e9eb;
}

/* Main */
.main {
  flex: 1;
  padding: 40px 0;
}

.section {
  animation: fadeIn 0.5s ease;
}

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

/* Welcome Card */
.welcome-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
}

.icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.welcome-card h2 {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.subtitle {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.line-icon {
  font-size: 20px;
}

.status {
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  min-height: 40px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.feature-item {
  background: var(--card-bg);
  padding: 32px 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-item p {
  color: var(--text-light);
  font-size: 14px;
}

/* Dashboard */
.dashboard-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.user-details {
  flex: 1;
}

.user-title {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.user-email {
  color: var(--text-light);
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

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

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: #e8e9eb;
  border-color: var(--primary);
}

.btn-action.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-action.primary:hover {
  background: var(--primary-dark);
}

.btn-action span {
  font-size: 20px;
}

/* Info Panel */
.info-panel {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.info-panel h3 {
  margin-bottom: 24px;
  font-size: 20px;
  color: var(--text);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.label {
  color: var(--text-light);
  font-weight: 600;
}

.value {
  color: var(--text);
  font-family: monospace;
}

.status-active {
  color: var(--primary);
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

/* 開發者 Console 面板 */
.console-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: #1e1e1e;
  color: #d4d4d4;
  border-top: 1px solid #444;
  display: flex;
  flex-direction: column;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 12px;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.console-panel.minimized {
  height: 30px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #252526;
  border-bottom: 1px solid #444;
  flex-shrink: 0;
}

.console-title {
  font-weight: 600;
  color: #fff;
}

.console-btn {
  padding: 4px 12px;
  background: #444;
  color: #d4d4d4;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  margin-left: 8px;
  transition: background 0.2s;
}

.console-btn:hover {
  background: #555;
}

.console-output {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 11px;
  line-height: 1.5;
}

.console-log {
  color: #d4d4d4;
  margin: 2px 0;
}

.console-log.error {
  color: #f48771;
}

.console-log.warn {
  color: #dcdcaa;
}

.console-log.info {
  color: #569cd6;
}

.console-log.success {
  color: #6a9955;
}

.console-timestamp {
  color: #858585;
  margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .welcome-card {
    padding: 40px 24px;
  }

  .welcome-card h2 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 16px;
  }

  .user-info {
    flex-direction: column;
    text-align: center;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
