* {
    box-sizing: border-box;
}

html,
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 40px;
    overflow-x: hidden;
    overflow-y: hidden;
    background: linear-gradient(135deg, hsl(150, 53%, 70%) 0%, #59e4af 100%);
}

.container {
    background: #fff;
    padding: 28px 30px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 400px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 20px;
    color: #2d2d2d;
}

.limit-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 14px;
}

textarea {
    width: 100%;
    height: 130px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid #00000021;
    border-radius: 10px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: #97dfc8;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.15);
}

textarea.limit-reached {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.progress-track {
    margin-top: 12px;
    height: 6px;
    width: 100%;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.15s ease, background 0.2s ease;
}

.progress-bar.limit-reached {
    background: #e74c3c;
}

.counter {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    text-align: right;
    transition: color 0.2s ease;
}

.counter.limit-reached {
    color: #e74c3c;
    font-weight: 600;
}

.warning {
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f5c6c2;
    border-radius: 8px;
    display: none;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}