* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: #f1f5f9;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    padding: 20px 16px 40px;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1);
    overflow: hidden;
}
.header {
    background: linear-gradient(135deg, #1e2a3a, #0f172a);
    padding: 24px;
    color: white;
}
.header h1 { font-size: 1.8rem; font-weight: 600; }
.content { padding: 24px; }
textarea {
    width: 100%;
    padding: 16px;
    font-family: monospace;
    font-size: 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    resize: vertical;
    transition: all 0.2s;
}
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
/* 占位符样式（灰色） */
textarea.placeholder-active {
    color: #9ca3af;
}
.button-group {
    display: flex;
    gap: 14px;
    margin: 20px 0 28px;
    flex-wrap: wrap;
}
.btn {
    flex: 1;
    background: #f1f5f9;
    border: none;
    padding: 14px 20px;
    font-weight: 600;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary { background: #1e293b; color: white; }
.btn-success { background: #059669; color: white; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.stats-panel {
    background: #f8fafc;
    border-radius: 28px;
    padding: 20px;
    margin: 20px 0;
}
.stats-content {
    font-family: monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
}
.preview-box {
    background: #fff;
    border-radius: 24px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
}
.preview-numbers {
    font-family: monospace;
    word-break: break-all;
    background: #fef9e8;
    padding: 12px;
    border-radius: 20px;
}
.error-msg {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 24px;
    padding: 14px;
    margin-top: 16px;
}
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 580px) {
    body { padding: 12px; }
    .content { padding: 20px; }
    .btn { padding: 12px; font-size: 0.9rem; }
}
