:root {
    --bg: #111827;
    --card: #1f2937;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --error: #ef4444;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background-color: var(--card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

h1 { margin-top: 0; font-size: 1.5rem; margin-bottom: 0.5rem; }
p.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1rem; text-align: left; }
label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; }

input, textarea {
    width: 100%;
    background: #374151;
    border: 1px solid #4b5563;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, textarea:focus { border-color: var(--accent); }

textarea { resize: vertical; min-height: 100px; font-family: monospace; }

button {
    width: 100%;
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover { background-color: var(--accent-hover); }

.hidden { display: none; }

.result-box {
    margin-top: 1rem;
    background: #374151;
    padding: 1rem;
    border-radius: 0.5rem;
    word-break: break-all;
    text-align: left;
    border-left: 4px solid var(--success);
}

.error-msg {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

.small-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.link-container {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}
.link-container input { font-size: 0.8rem; }
.link-container button { width: auto; white-space: nowrap; }

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}