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

:root {
  --bg: #1a1a2e;
  --bg-card: #16213e;
  --bg-hover: #1e2d50;
  --text: #e0e0e0;
  --text-dim: #8892a0;
  --accent: #00d4ff;
  --accent-hover: #33ddff;
  --success: #00ff88;
  --warning: #ffaa00;
  --danger: #ff3366;
  --border: #2a2a4a;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00d4ff, #7b2ff7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.status-bar {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 8px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Skill List */
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.skill-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.skill-card.enabled {
  border-left: 3px solid var(--accent);
}

.skill-card.running {
  border-left: 3px solid var(--success);
}

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

.skill-icon.mail { background: #1a3a5c; }
.skill-icon.video { background: #4a1a2e; }
.skill-icon.calendar { background: #1a4a3a; }
.skill-icon.meeting { background: #3a2a1a; }
.skill-icon.news { background: #2a1a4a; }
.skill-icon.report { background: #1a3a3a; }
.skill-icon.timer { background: #4a3a1a; }
.skill-icon.translate { background: #1a2a4a; }
.skill-icon.star { background: #2a2a3a; }

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

.skill-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.skill-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-status {
  font-size: 0.65rem;
  color: var(--success);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #333;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle .slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .slider {
  background: var(--accent);
}

.toggle input:checked + .slider::before {
  transform: translateX(20px);
}

/* Run Button (inline) */
.run-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

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

.run-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Detail Panel */
.detail-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.detail-panel.hidden {
  display: none;
}

.detail-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

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

.detail-header h2 {
  font-size: 1.2rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-btn:hover {
  color: var(--text);
}

.config-section {
  margin: 16px 0;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.config-label {
  font-size: 0.85rem;
}

.config-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  width: 80px;
  text-align: right;
}

.btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

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

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
