:root { --sidebar-width: 280px; --sidebar-bg: #1a1d27; --sidebar-bg-hover: #242836; --sidebar-text: #b0b8c8; --sidebar-text-active: #ffffff; --accent: #5b8def; --accent-light: #e8f0fe; --accent-glow: rgba(91,141,239,0.25); --danger: #e85d75; --danger-light: #fde8ec; --success: #4caf84; --success-light: #e8f7ef; --bg: #f3f4f6; --card-bg: #ffffff; --text-primary: #1f2937; --text-secondary: #6b7280; --text-muted: #9ca3af; --border: #e5e7eb; --border-focus: #5b8def; --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow-md: 0 4px 16px rgba(0,0,0,0.08); --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --transition: 0.25s cubic-bezier(0.4,0,0.2,1); --font-mono: 'SF Mono','Cascadia Code','Consolas','Monaco','Menlo','Courier New',monospace; --grid-color: rgba(0,0,0,0.04); --grid-size: 22px; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei','Helvetica Neue',sans-serif; background-color: #f8f9fb; background-image: linear-gradient(var(--grid-color) 1px,transparent 1px), linear-gradient(90deg,var(--grid-color) 1px,transparent 1px); background-size: var(--grid-size) var(--grid-size); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }
a { text-decoration: none; } .app-container { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); min-width: var(--sidebar-width); background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; box-shadow: 4px 0 24px rgba(0,0,0,0.25); transition: transform var(--transition); overflow-y: auto; }
.sidebar-top { padding: 28px 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: center; }
.logo-wrapper { display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap; margin-bottom: 8px; }
.logo-char { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 1.65rem; font-weight: 700; width: 34px; height: 34px; border-radius: 8px; }
.logo-l { background: #e8f0fe; color: #3b7de0; } .logo-i { background: #fde8ec; color: #d94862; } .logo-pipe { background: #e5e7eb; color: #6b7280; font-size: 1.4rem; }
.logo-text { font-size: 1.05rem; font-weight: 700; color: #ffffff; margin-left: 6px; }
.logo-subtitle { font-size: 0.78rem; color: #6b7280; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--sidebar-text); cursor: pointer; transition: all var(--transition); font-family: inherit; font-size: 0.95rem; }
.nav-btn:hover { background: var(--sidebar-bg-hover); color: #d1d5db; transform: translateX(4px); }
.nav-btn.active { background: rgba(91,141,239,0.18); color: #a8c8ff; border-color: rgba(91,141,239,0.3); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-footer { padding: 16px 14px 20px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 8px; }
.footer-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); color: #8b92a3; font-size: 0.72rem; transition: all var(--transition); }
.footer-link:hover { background: rgba(255,255,255,0.04); color: #c0c7d4; }
.footer-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.mobile-menu-toggle { display: none; position: fixed; top: 16px; left: 16px; z-index: 200; width: 42px; height: 42px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-md); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.mobile-menu-toggle span { display: block; width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; }
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 32px 36px; display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
.panel { width: 100%; max-width: 900px; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border); animation: fadeSlideIn 0.45s cubic-bezier(0.22,1,0.36,1); }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.panel-header { padding: 24px 28px 18px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.panel-title { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.title-icon { font-size: 1.4rem; }
.panel-subtitle { font-size: 0.85rem; color: var(--text-secondary); }
.panel-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.char-count { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; background: #f3f4f6; padding: 2px 10px; border-radius: 20px; }
.code-area { width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.7; resize: vertical; transition: all var(--transition); background: #fafbfc; min-height: 200px; }
.code-area:focus { outline: none; border-color: var(--border-focus); background: #ffffff; box-shadow: 0 0 0 4px rgba(91,141,239,0.08); }
.code-area.output-area { background: #fafbfc; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 10px; font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition); border: none; white-space: nowrap; }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline { background: #ffffff; color: var(--text-secondary); border: 2px solid var(--border); }
.btn-outline:hover { background: #f9fafb; border-color: #c0c7d0; color: var(--text-primary); }
.btn-secondary { background: var(--accent-light); color: var(--accent); }
.btn-secondary:hover { filter: brightness(0.95); }
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: #fafbfc; border-radius: var(--radius); border: 2px solid var(--border); }
.stats-row span { font-size: 0.85rem; color: var(--text-secondary); }
.stats-row strong { color: var(--accent); }
.output-group { display: flex; flex-direction: column; gap: 10px; }
.output-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(16px) scale(0.95); background: #1f2937; color: #ffffff; padding: 12px 24px; border-radius: 30px; font-size: 0.88rem; font-weight: 500; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.22,1,0.36,1); z-index: 9999; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }
.sidebar-overlay.visible { display: block; }
@media (max-width: 900px) { .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .main-content { margin-left: 0; padding: 20px 16px; } .mobile-menu-toggle { display: flex; } .panel { max-width: 100%; } .panel-body { padding: 18px 16px; } .panel-header { padding: 18px 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; } }
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px 14px !important;
    padding: 10px 40px 10px 16px !important;
    border: 2px solid var(--border) !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    transition: all var(--transition) !important;
    line-height: 1.5 !important;
}
select:hover {
    background-color: #f9fafb !important;
    border-color: #c0c7d0 !important;
}
select:focus {
    outline: none !important;
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 4px rgba(91,141,239,0.08) !important;
    background-color: #ffffff !important;
}
