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

body {
    background: #161311;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e0e0e0;
}

.card {
    background: #1e1e1e;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.divider {
    border: 0;
    height: 1px;
    background: #333;
    margin: 30px 0;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: #bbb;
}

.sub-label {
    font-weight: 400;
    color: #666;
    font-size: 12px;
    margin-left: 6px;
}

.textarea-wrapper {
    position: relative;
    background: #252525;
    border-radius: 8px;
    border: 1px solid #333;
    transition: border-color 0.2s;
    overflow: hidden;
}

.textarea-wrapper:focus-within {
    border-color: #555;
}

.textarea-wrapper.is-danger {
    border-color: #e63946 !important;
}
.textarea-wrapper.is-warning {
    border-color: #e9c46a !important;
}

textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #e0e0e0;
    padding: 16px;
    font-size: 16px;
    resize: none;
    outline: none;
    font-family: inherit;
    display: block;
}

textarea::-webkit-scrollbar { width: 6px; }
textarea::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.progress-bg {
    height: 4px;
    width: 100%;
    background: #1a1a1a;
    position: absolute;
    bottom: 0;
    left: 0;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #2a9d8f;
    transition: width 0.2s, background-color 0.3s;
}

.is-warning .progress-fill { background: #e9c46a; }
.is-danger .progress-fill { background: #e63946; }

.footer-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.counter-text {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #888;
}

.is-danger + .footer-row .counter-text {
    color: #e63946;
}
