@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

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

body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 28px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    position: relative;
}

/* 顶部装饰线 */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px;
    background: linear-gradient(90deg, transparent, #c8c0e0, transparent);
    border-radius: 0 0 3px 3px;
}

.icon-wrap {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #f0ecf8, #ebe4f5);
    border: 1px solid #e4ddef;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.icon-wrap i { font-size: 22px; color: #8b7ec8; }

h2 { font-size: 20px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.subtitle { font-size: 13px; color: #999; margin-bottom: 28px; }

label { display: block; font-size: 12px; font-weight: 500; color: #888; margin-bottom: 8px; letter-spacing: 1px; }

textarea {
    width: 100%;
    height: 140px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    resize: none;
    outline: none;
    background: #fafafa;
    color: #333;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
textarea:focus {
    border-color: #b8aed8;
    box-shadow: 0 0 0 3px rgba(139,126,200,0.1);
    background: #fff;
}
textarea::placeholder { color: #bbb; }

.counter-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.counter { font-size: 12px; color: #bbb; font-variant-numeric: tabular-nums; }
.counter.over { color: #e06060; }

.btn {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #8b7ec8, #7a6cb8);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}
.btn:hover { 
    background: linear-gradient(135deg, #9d91d4, #8b7ec8);
    box-shadow: 0 4px 14px rgba(139,126,200,0.3);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

#result {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    display: none;
}
.success { background: #f0faf2; color: #3a9e58; border: 1px solid #c0ebcc; display: block !important; }
.error { background: #fef2f2; color: #d05050; border: 1px solid #fcd0d0; display: block !important; }

.spinner {
    display: inline-block;
    width: 13px; height: 13px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }