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

body {
    background: #0f0f1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: #1a1a2e;
    border-bottom: 1px solid #2a2a4a;
    padding: 0 2rem;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    color: #7b8cde;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.logo:hover { color: #9aaae8; }

/* Main */
main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Footer */
footer {
    background: #1a1a2e;
    border-top: 1px solid #2a2a4a;
    text-align: center;
    padding: 1rem;
    color: #888;
    font-size: 0.85rem;
}
footer a {
    color: #7b8cde;
    text-decoration: none;
}
footer a:hover { color: #9aaae8; }

/* Card */
.card {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.75rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: #7b8cde;
    color: #0f0f1a;
    font-weight: 600;
}
.btn-primary:hover { background: #9aaae8; }

.btn-secondary {
    background: transparent;
    color: #7b8cde;
    border: 1px solid #2a2a4a;
}
.btn-secondary:hover {
    background: #1a1a2e;
    border-color: #7b8cde;
}

/* Form */
.form-heading {
    font-size: 1.1rem;
    font-weight: 400;
    color: #aaa;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #aaa;
    font-size: 0.875rem;
}

.muted { color: #888; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #0f0f1a;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7b8cde;
}

.form-group select option {
    background: #1a1a2e;
}

.form-group textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 320px;
}

.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group { flex: 1; }

/* Error */
.error-msg {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid #e94560;
    color: #e94560;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* Paste view — header */
.paste-header {
    margin-bottom: 1.25rem;
}

.paste-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    word-break: break-word;
}

.paste-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    color: #aaa;
    font-size: 0.85rem;
}

.lang-badge {
    background: #2a2a4a;
    color: #7b8cde;
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Paste view — toolbar */
.paste-toolbar {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Code block */
.code-wrapper {
    border-radius: 8px;
    border: 1px solid #2a2a4a;
    overflow: hidden;
}

.code-wrapper .highlight {
    margin: 0;
    overflow-x: auto;
}

/* Pygments table (linenos=True) */
.code-wrapper .highlighttable {
    border-spacing: 0;
    width: 100%;
    border-collapse: collapse;
}

.code-wrapper td.linenos {
    padding: 1rem 0.75rem 1rem 1rem;
    text-align: right;
    vertical-align: top;
    min-width: 3rem;
    user-select: none;
    border-right: 1px solid #2a2a4a;
}

.code-wrapper td.linenos .linenodiv pre {
    padding: 0;
    margin: 0;
    background: transparent !important;
    color: #555;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-wrapper td.code {
    padding: 0;
    width: 100%;
}

.code-wrapper td.code .highlight {
    overflow-x: auto;
}

.code-wrapper td.code .highlight pre {
    padding: 1rem;
    margin: 0;
    background: transparent !important;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 404 */
.not-found {
    text-align: center;
    padding: 5rem 1rem;
}

.not-found h1 {
    font-size: 6rem;
    color: #2a2a4a;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.not-found h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.not-found p {
    color: #aaa;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
    header { padding: 0 1rem; }
    main { padding: 0 1rem; margin: 1.25rem auto; }
    .card { padding: 1.25rem; }
    .form-row { flex-direction: column; gap: 0; }
    .paste-meta { gap: 0.4rem 0.75rem; }
}
