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

:root {
    /* Default colors - can be overridden by environment variables via injected CSS */
    --primary-color: #4a90e2;
    --primary-hover: #5ba0f2;
    --title-color: var(--primary-color);
    --button-primary-color: var(--primary-color);
    --button-primary-hover: var(--primary-hover);
    --button-secondary-color: #6c757d;
    --button-secondary-hover: #7d8a94;
    --secondary-color: #6c757d;
    --secondary-hover: #7d8a94;
    --background: #161616;
    --surface: #1b1b1b;
    --text: #e8e8e8;
    --text-muted: #a0a0a0;
    --border: #333333;
    --error: #ff6b6b;
    --success: #51cf66;
    --code-bg: #252525;
    --shadow: rgba(0, 0, 0, 0.5);
    --input-bg: #252525;
    --input-border: #3a3a3a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

header h1 a {
    color: var(--title-color);
    text-decoration: none;
    transition: color 0.2s;
}

header h1 a:hover {
    color: var(--primary-hover);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

main {
    background: var(--surface);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
}

.paste-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

textarea,
select,
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--button-primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

textarea {
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--button-primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--button-primary-hover);
}

.btn-secondary {
    background: var(--button-secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--button-secondary-hover);
}

.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #1e2a3a;
    border: 1px solid #2d3f54;
    border-radius: 4px;
}

.result-content h3 {
    margin-bottom: 1rem;
    color: var(--success);
}

.url-box {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.url-box input {
    flex: 1;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--input-border);
}

.result-content a {
    margin-top: 1rem;
}

.error {
    padding: 1rem;
    background: #3a1f1f;
    border: 1px solid #5a2f2f;
    border-radius: 4px;
    color: var(--error);
    margin-top: 1rem;
}

.password-prompt {
    margin-top: 2rem;
}

.password-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.password-box h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.password-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.password-input-group {
    display: flex;
    gap: 0.5rem;
}

.password-input-group input {
    flex: 1;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.paste-content {
    margin-top: 2rem;
}

.paste-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.paste-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.paste-info strong {
    color: var(--text);
    font-weight: 600;
}

.paste-body {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
}

.paste-body pre {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #f8f8f2;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.paste-body code {
    color: inherit;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Prism.js theme adjustments */
.paste-body pre[class*="language-"] {
    background: transparent;
    margin: 0;
    padding: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .password-input-group {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }

    .paste-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .paste-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .url-box {
        flex-direction: column;
    }

    .url-box input {
        width: 100%;
    }
}

/* Scrollbar styling for code blocks */
.paste-body::-webkit-scrollbar {
    height: 8px;
}

.paste-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.paste-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.paste-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Scrollbar for page */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

