:root {
    --primary-color: #111;
    --secondary-color: #eee;
    --accent-color: #b01;
    --border-color: #999;
    --highlight-color: #f7f7f7;
    --safe-color: #66cc00;
    --euclid-color: #ffcc00;
    --keter-color: #cc0000;
    --thaumiel-color: #6600cc;
    --neutralized-color: #999999;
}

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

body {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
header {
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.top-bar {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 1.5rem;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Main Content Styles */
main {
    padding: 2rem 0;
}

.warning-box {
    background-color: var(--accent-color);
    color: white;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.warning-box h1 {
    font-size: 2.5rem;
    margin: 0.5rem 0;
}

.welcome-message {
    margin-bottom: 2rem;
}

.welcome-message h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.featured-scps {
    margin-bottom: 2rem;
}

.featured-scps h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.scp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.scp-item {
    border: 1px solid var(--border-color);
    padding: 1rem;
    background-color: var(--highlight-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scp-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.scp-item h4 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.object-class {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.object-class.safe {
    background-color: var(--safe-color);
}

.object-class.euclid {
    background-color: var(--euclid-color);
}

.object-class.keter {
    background-color: var(--keter-color);
}

.object-class.thaumiel {
    background-color: var(--thaumiel-color);
}

.object-class.neutralized {
    background-color: var(--neutralized-color);
}

.create-cta {
    background-color: var(--highlight-color);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* Action buttons */
.scp-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.button.edit {
    background-color: #0066cc;
}

.button.edit:hover {
    background-color: #0052a3;
}

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

.button.delete:hover {
    background-color: #900;
}

/* Read-only input styling */
input[readonly] {
    background-color: var(--highlight-color);
    cursor: not-allowed;
}

/* Footer Styles */
footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* SCP View Styles */
.scp-document {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
}

.scp-document h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.scp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.scp-document .item-number {
    font-size: 1.5rem;
    font-weight: bold;
}

.scp-document .object-class-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scp-document .section {
    margin-bottom: 1.5rem;
}

.scp-document .section-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Redacted text effect */
.redacted {
    background-color: black;
    color: transparent;
    user-select: none;
}

/* AI Generation Styles */
.ai-generation-section {
    background-color: var(--highlight-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-color);
}

.ai-generation-section h3 {
    margin-bottom: 1rem;
}

.status-message {
    margin-top: 1rem;
    padding: 0.5rem;
    font-style: italic;
}

.status-message.loading {
    color: #0066cc;
}

.status-message.success {
    color: var(--safe-color);
}

.status-message.error {
    color: var(--keter-color);
}

/* Addenda Styles */
#addenda-container {
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--highlight-color);
    border: 1px solid var(--border-color);
}

.addendum-item {
    border: 1px solid var(--border-color);
    background-color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.addendum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.addendum-title-input {
    flex-grow: 1;
    margin-right: 1rem;
}

.remove-addendum {
    background-color: var(--accent-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.remove-addendum:hover {
    background-color: #900;
}

/* View page addenda styles */
.addendum-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.addendum-section:last-child {
    border-bottom: none;
}