:root {
    --bg-color: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --surface-color: #ffffff;
    --border-color: #e5e7eb;
    --primary-color: #111827;
    /* Black/Dark Gray */
    --hover-color: #000000;
    --font-family: 'Outfit', sans-serif;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

header {
    text-align: center;
    max-width: 600px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

form {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 0.75rem;
    background: var(--surface-color);
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

form:focus-within {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #9ca3af;
}

input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    outline: none;
}

input[type="text"]::placeholder {
    color: #9ca3af;
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: calc(var(--radius) - 4px);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Results Area */
.results-container {
    width: 100%;
    background: #f3f4f6;
    /* Darker gray frame */
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Stronger shadow */
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.results-container.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.pre-header {
    background: #f3f4f6;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bg-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-btn {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.copy-btn:hover {
    background: #ffffff;
    color: black;
    transform: none;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

pre {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    /* More modern than Courier */
    font-size: 0.8rem;
    line-height: 1.6;
    color: #374151;
    overflow-x: auto;
    white-space: pre;
    background: #ffffff;
    /* Keeping white as requested */
    border-top: 1px solid var(--border-color);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin .8s linear infinite;
    display: none;
}

.loading .spinner {
    display: inline-block;
}

.loading .btn-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.site-footer {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #9ca3af;
    text-align: center;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.site-footer a:hover {
    color: #4b5563;
}

.heart {
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.site-footer a:hover .heart {
    color: #ef4444;
    /* Red on hover */
}

/* Responsive */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    form {
        padding: 0.25rem;
    }

    button {
        padding: 0.6rem 1rem;
    }
}