*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #6C63FF; --primary-light: #A78BFA; --primary-dark: #4F46E5;
  --accent: #22D3EE; --bg-deep: #0A0A14; --bg-surface: #12121E;
  --bg-card: #1A1A2E; --bg-elevated: #242440;
  --text-primary: #F1F1F6; --text-secondary: #9CA3AF; --text-muted: #6B7280;
  --border: rgba(108,99,255,0.15); --border-accent: rgba(108,99,255,0.35);
  --success: #34D399; --error: #F87171;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep); color: var(--text-primary);
  line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.app-container { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem; min-height: 100vh; display: flex; flex-direction: column; }
.app-header { text-align: center; margin-bottom: 2rem; }
.logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.logo h1 { font-size: 1.75rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.02em; }
.subtitle { color: var(--text-secondary); font-size: 1rem; }
.tab-bar { display: flex; gap: 0.25rem; background: var(--bg-card); border-radius: var(--radius-md); padding: 4px; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1rem; border: none; background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 0.9375rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.tab:hover { color: var(--text-primary); background: rgba(108,99,255,0.08); }
.tab.active { background: var(--primary); color: #fff; box-shadow: 0 2px 12px rgba(108,99,255,0.4); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.wizard-steps { display: flex; flex-direction: column; gap: 1rem; }
.wizard-step { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; transition: border-color var(--transition); }
.wizard-step:hover { border-color: var(--border-accent); }
.wizard-step.hidden { display: none; }
.step-label { display: flex; align-items: center; gap: 0.75rem; font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border-radius: 50%; font-size: 0.8125rem; font-weight: 700; flex-shrink: 0; }
select, input[type="text"] { width: 100%; padding: 0.75rem 1rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.9375rem; transition: all var(--transition); appearance: none; cursor: pointer; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
select:focus, input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
select option { background: var(--bg-card); color: var(--text-primary); }
.dropdown-group label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.375rem; text-transform: uppercase; letter-spacing: 0.05em; }
.time-inputs { display: flex; align-items: flex-end; gap: 0.75rem; }
.time-inputs .dropdown-group { flex: 1; }
.time-separator { font-size: 1.5rem; font-weight: 700; color: var(--primary-light); padding-bottom: 0.5rem; }
.day-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.day-chip { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elevated); color: var(--text-secondary); font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all var(--transition); user-select: none; }
.day-chip:hover { border-color: var(--primary); color: var(--text-primary); }
.day-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(108,99,255,0.35); }
.custom-fields { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; }
.parse-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; }
.parse-label { display: block; font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.parse-input-group { display: flex; gap: 0.5rem; }
.parse-input-group input { flex: 1; font-size: 1.125rem; letter-spacing: 0.05em; }
.parse-result { margin-top: 1rem; padding: 1rem 1.25rem; background: rgba(108,99,255,0.08); border: 1px solid var(--border-accent); border-radius: var(--radius-sm); font-size: 1rem; line-height: 1.7; }
.parse-result.hidden { display: none; }
.parse-result.error { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); color: var(--error); }
.btn { padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 2px 12px rgba(108,99,255,0.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(108,99,255,0.5); }
.output-section { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.cron-display { background: var(--bg-card); border: 1px solid var(--border-accent); border-radius: var(--radius-lg); padding: 1.75rem; text-align: center; position: relative; overflow: hidden; }
.cron-display::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light)); }
.cron-label { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.cron-output { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 0.375rem; }
.cron-field { font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 600; color: var(--primary-light); background: var(--bg-elevated); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); min-width: 3.5rem; text-align: center; transition: all var(--transition); border: 1px solid transparent; }
.cron-field:hover { border-color: var(--primary); transform: translateY(-2px); }
.cron-field.highlight { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(34,211,238,0.2); }
.cron-field-labels { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.cron-field-labels span { font-size: 0.6875rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; min-width: 3.5rem; text-align: center; }
.human-readable { font-size: 1.0625rem; font-weight: 500; color: var(--text-secondary); padding-top: 0.75rem; border-top: 1px solid var(--border); }
.copy-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.copy-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 0.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); font-family: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.copy-btn:hover { border-color: var(--primary); color: var(--text-primary); background: rgba(108,99,255,0.08); }
.copy-btn.copied { border-color: var(--success); color: var(--success); background: rgba(52,211,153,0.08); }
.timezone-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; }
.tz-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.75rem; }
.tz-header svg { color: var(--primary-light); }
.tz-controls select { width: 100%; }
.next-runs-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; }
.next-runs-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.75rem; }
.next-runs-header svg { color: var(--primary-light); }
.next-runs-list { list-style: none; counter-reset: runs; }
.next-runs-list li { counter-increment: runs; display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: 0.875rem; color: var(--text-secondary); transition: color var(--transition); }
.next-runs-list li:last-child { border-bottom: none; }
.next-runs-list li:hover { color: var(--text-primary); }
.next-runs-list li::before { content: counter(runs); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-elevated); border: 1px solid var(--border); font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.next-runs-list li .run-relative { margin-left: auto; font-size: 0.75rem; color: var(--primary-light); font-family: 'Inter', sans-serif; }
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-card); border: 1px solid var(--border-accent); border-radius: var(--radius-md); padding: 0.75rem 1.5rem; font-size: 0.9375rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 1000; transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.hidden { display: block; transform: translateX(-50%) translateY(100px); }
.app-footer { margin-top: auto; padding-top: 2rem; text-align: center; font-size: 0.8125rem; color: var(--text-muted); }
@media (max-width: 640px) {
  .app-container { padding: 1.25rem 1rem; }
  .logo h1 { font-size: 1.375rem; }
  .cron-field { font-size: 1.5rem; min-width: 2.75rem; padding: 0.375rem 0.5rem; }
  .cron-output, .cron-field-labels { gap: 0.375rem; }
  .cron-field-labels span { min-width: 2.75rem; font-size: 0.625rem; }
  .copy-formats { grid-template-columns: 1fr; }
  .custom-fields { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) { .custom-fields { grid-template-columns: repeat(2, 1fr); } }
