* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #1a2535;
    font-family: 'DM Sans', sans-serif;
    background-image: radial-gradient(ellipse at 20% 50%, rgba(52, 152, 219, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(46, 204, 113, 0.05) 0%, transparent 50%);
}

.container {
    width: 460px;
    padding: 36px;
    background: #243044;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.header h2 {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ecf0f1;
    letter-spacing: -0.5px;
}

.limit-badge {
    font-size: 0.78rem;
    color: #7f8c9a;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.limit-badge strong {
    color: #3498d8;
}

.textarea-wrapper {
    position: relative;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 16px;
    background: #1a2535;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    outline: none;
    resize: none;
    font-size: 0.97rem;
    font-family: 'DM Sans', sans-serif;
    color: #ecf0f1;
    line-height: 1.7;
    transition: border-color 0.25s, box-shadow 0.25s;
}

textarea::placeholder {
    color: #4a5a6e;
}

textarea:focus {
    border-color: #3498d8;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

textarea.warn {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.12);
}

textarea.danger {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-top: -2px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 0 0 12px 12px;
    background: #3498d8;
    transition: width 0.2s ease, background 0.3s ease;
}

.progress-fill.warn {
    background: #e67e22;
}

.progress-fill.danger {
    background: #e74c3c;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: #1a2535;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498d8;
    transition: color 0.3s, transform 0.15s;
    display: block;
    line-height: 1;
}

.stat-value.bump {
    transform: scale(1.2);
}

.stat-value.warn {
    color: #e67e22;
}

.stat-value.danger {
    color: #e74c3c;
}

.stat-label {
    font-size: 0.68rem;
    color: #5d7080;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 10px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: #8fa0b0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.11);
    color: #c0d0da;
}

.btn-primary {
    background: #3498d8;
    color: #fff;
    box-shadow: 0 4px 14px rgba(52, 152, 216, 0.3);
}

.btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 4px 18px rgba(52, 152, 216, 0.45);
}

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2ecc71;
    color: #fff;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.35);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}