:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success-bg: #def7ec;
    --success-text: #03543f;
    --error-bg: #fde8e8;
    --error-text: #9b1c1c;
    --code-bg: #1f2937;
    --code-text: #f3f4f6;
    --radius: 8px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea {
    min-height: 250px;
    resize: vertical;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-hover);
}

.btn.secondary {
    background-color: var(--border-color);
    color: var(--text-main);
}

.btn.secondary:hover {
    background-color: #d1d5db;
}

.btn.icon-btn {
    padding: 0.4rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    fill: currentColor;
}

.btn.icon-btn:hover {
    background: var(--bg-color);
}

.hidden {
    display: none !important;
}

.result-message, .error-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-message {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #c3edd5;
}

.error-message {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #f8b4b4;
}

#generatedId {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.5);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.display-header h2 {
    margin-bottom: 0;
}

pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Scrollbar styling for pre */
pre::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
pre::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}
pre::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
}
