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

:root {
    --black: #222222;
    --white: #ffffff;
    --primary: #ff6b00;
    --secondary: #00d4ff;
    --danger: #ff0055;
    --success: #00cc44;
    --border: 4px solid var(--black);
    --shadow: 8px 8px 0 var(--black);
}

body {
    font-family: 'Courier New', monospace;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Main Header */
.main-header {
    background: var(--white);
    border-bottom: var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--black);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    transition: all 0.1s;
}

.nav-link:hover {
    border: 2px solid var(--black);
}

.nav-user {
    font-size: 0.9rem;
    color: #666;
}

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

h1, h2, h3 {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Auth Pages */
.auth-box {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: var(--border);
    background: var(--white);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--secondary);
}

/* Buttons */
.btn,
.btn-small,
button.btn,
button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--black);
    border: var(--border);
    box-shadow: 4px 4px 0 var(--black);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.1s;
    font-size: 1rem;
}

.btn:hover,
.btn-small:hover,
button.btn:hover,
button:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--black);
    color: var(--black);
    background: var(--primary);
}

.btn:active,
.btn-small:active,
button.btn:active,
button:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--black);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: var(--border);
}

.page-header h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.page-header .domain {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.websites-section {
    margin-bottom: 3rem;
}

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

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.website-card {
    display: block;
    padding: 1.5rem;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--black);
    transition: all 0.1s;
    cursor: pointer;
}

.website-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--black);
    color: var(--black);
}

.website-card:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 var(--black);
}

.website-card h3 {
    margin-bottom: 0.5rem;
}

.website-card .domain {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.website-card .stats {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 2px solid var(--black);
}

.website-card .stats span {
    font-weight: bold;
}

.website-card-archived {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f5f5f5;
    border: 2px solid var(--black);
    text-decoration: none;
    color: var(--black);
}

.website-card-archived .card-content {
    flex: 1;
}

.website-card-archived h3 {
    margin-bottom: 0.5rem;
}

.website-card-archived .domain {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.website-card-archived .stats {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 2px solid var(--black);
}

.website-card-archived .stats span {
    font-weight: bold;
}

.archived-toggle {
    margin-top: 2rem;
    text-align: center;
}

.archived-link {
    color: #999;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: lowercase;
    transition: color 0.2s;
}

.archived-link:hover {
    color: var(--black);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    border: var(--border);
    background: #f5f5f5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border: var(--border);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 90%;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Error Messages */
.error {
    color: var(--danger);
    font-weight: bold;
    margin-top: 1rem;
    padding: 0.75rem;
    border: 2px solid var(--danger);
    background: #ffe0e0;
    display: none;
}

.error:not(:empty) {
    display: block;
}

/* Links */
a {
    color: var(--black);
    text-decoration: underline;
    font-weight: bold;
}

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

/* Override link hover for buttons */
a.btn:hover,
a.btn-small:hover {
    color: var(--black);
}

/* Website Detail Page */
.embed-section,
.pages-section,
.comments-section,
.prompts-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

.embed-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.embed-option {
    padding: 1rem;
    background: #f5f5f5;
    border: 2px solid var(--black);
}

.embed-option h3 {
    margin-bottom: 0.5rem;
}

.embed-option pre {
    background: var(--white);
    border: 2px solid var(--black);
    padding: 1rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}

.warning {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fff3cd;
    border: 2px solid var(--black);
    font-size: 0.9rem;
}

.warning code {
    background: var(--white);
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--black);
}

.pages-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-item {
    padding: 1rem;
    background: #f5f5f5;
    border: 2px solid var(--black);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.page-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.page-path {
    font-weight: bold;
    word-break: break-all;
}

.page-comments {
    font-size: 0.9rem;
    color: #666;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.comments-list-detail {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-card-detail {
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--black);
    transition: all 0.1s;
}

.comment-card-detail:hover {
    background: #f9f9f9;
}

.comment-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--black);
}

.comment-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-right {
    display: flex;
    align-items: center;
}

.comment-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 2px solid var(--black);
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comment-status.status-pending {
    background: #fff3cd;
}

.comment-status.status-approved {
    background: var(--success);
}

.comment-status.status-rejected {
    background: var(--danger);
    color: var(--white);
}

.manual-badge-inline {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--secondary);
    border: 2px solid var(--black);
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comment-author-inline {
    font-weight: bold;
    font-size: 0.95rem;
}

.comment-date-inline {
    font-size: 0.8rem;
    color: #666;
}

.comment-content-main {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.comment-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 2px solid var(--black);
}

.comment-page-inline {
    font-size: 0.8rem;
    color: #666;
    word-break: break-all;
    flex: 1;
}

.comment-actions-inline {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-action {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: var(--white);
    border: 2px solid var(--black);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.1s;
}

.btn-action:hover {
    background: var(--black);
    color: var(--white);
}

.btn-action.approve-comment {
    border-color: var(--success);
    color: var(--success);
}

.btn-action.approve-comment:hover {
    background: var(--success);
    color: var(--black);
}

.btn-action.reject-comment {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-action.reject-comment:hover {
    background: var(--danger);
    color: var(--white);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--black);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.1s;
}

.filter-tab:hover {
    background: #f0f0f0;
}

.filter-tab.active {
    background: var(--black);
    color: var(--white);
}

.comment-card-detail[data-status].hidden {
    display: none;
}

.info-box {
    padding: 0.75rem 1rem;
    background: var(--secondary);
    border: 2px solid var(--black);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.prompt-card {
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--black);
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--black);
}

.prompt-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 2px solid var(--black);
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prompt-status.status-active {
    background: var(--success);
}

.prompt-status.status-inactive {
    background: #ccc;
}

.prompt-actions {
    display: flex;
    gap: 0.5rem;
}

.prompt-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

.rerun-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--black);
}

.help-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Collapsible Embed Section */
.embed-sticky {
    margin-bottom: 2rem;
    border: 2px solid var(--black);
    background: var(--white);
}

.embed-toggle {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #f5f5f5;
    border: none;
    border-bottom: 2px solid var(--black);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    box-shadow: none;
    transform: none;
}

.embed-toggle:hover {
    background: #e8e8e8;
    transform: none;
    box-shadow: none;
}

.embed-toggle:active {
    transform: none;
    box-shadow: none;
}

.toggle-icon {
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.embed-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.embed-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.embed-content.collapsed {
    max-height: 0;
}

.embed-content .embed-options {
    padding: 1.5rem;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 4px solid var(--black);
    border-top: 2px solid var(--black);
    border-left: 2px solid var(--black);
    border-right: 2px solid var(--black);
}

.tab-button {
    padding: 1rem 2rem;
    background: #f5f5f5;
    border: none;
    border-right: 2px solid var(--black);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    box-shadow: none;
    transform: none;
}

.tab-button:hover {
    background: #e8e8e8;
    transform: none;
    box-shadow: none;
}

.tab-button:active {
    transform: none;
    box-shadow: none;
}

.tab-button.active {
    background: var(--secondary);
    color: var(--black);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Style Tab */
.style-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

.style-selector-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.style-options h2 {
    margin-bottom: 0.5rem;
}

.style-description {
    color: #666;
    margin-bottom: 2rem;
}

.style-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.style-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #f5f5f5;
    border: 3px solid var(--black);
    cursor: pointer;
    transition: all 0.2s;
}

.style-option:hover {
    background: #e8e8e8;
}

.style-option.active {
    background: var(--secondary);
    border-color: var(--black);
}

.style-option input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary);
    flex-shrink: 0;
}

.style-preview-small {
    flex: 1;
}

.style-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.style-tags {
    font-size: 0.85rem;
    color: #666;
}

.custom-css-editor {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: var(--border);
    background: #f5f5f5;
    margin-bottom: 1rem;
    resize: vertical;
}

.custom-css-editor:focus {
    outline: none;
    background: var(--white);
}

.style-preview-live {
    position: sticky;
    top: 120px;
}

.style-preview-live h3 {
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 1rem;
}

.style-preview-live iframe {
    width: 100%;
    height: 600px;
    border: var(--border);
    background: var(--white);
}

@media (max-width: 1024px) {
    .style-selector-container {
        grid-template-columns: 1fr;
    }

    .style-preview-live {
        position: static;
    }
}

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.error-box {
    text-align: center;
    max-width: 600px;
    padding: 3rem;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    margin: 0;
    line-height: 1;
    color: var(--primary);
    text-shadow: 4px 4px 0 var(--black);
}

.error-message {
    font-size: 1.5rem;
    margin: 1rem 0;
    text-transform: uppercase;
}

.error-description {
    font-size: 1rem;
    margin: 1rem 0;
    color: #666;
}

.haiku-box {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 2px solid var(--black);
}

.haiku-text {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-line;
    font-style: italic;
    color: #666;
}

/* Footer */
.main-footer {
    background: var(--white);
    border-top: var(--border);
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--black);
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.footer-section h4 {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.footer-section p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--black);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #666;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Landing Page */
.landing-main {
    min-height: calc(100vh - 80px);
}

.hero-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--white), #f5f5f5);
}

.hero-section h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-outline {
    background: var(--white);
    border: var(--border);
    box-shadow: 4px 4px 0 var(--black);
}

.btn-outline:hover {
    background: #f5f5f5;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--black);
}

.features-section {
    padding: 6rem 0;
    background: var(--white);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
}

.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: var(--secondary);
    border-top: var(--border);
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #333;
}

/* Content Pages (About, Roadmap, etc) */
.content-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-page h1 {
    margin-bottom: 2rem;
}

.content-page section {
    margin-bottom: 3rem;
}

.content-page h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--black);
}

.content-page h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.content-page p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #333;
}

.content-page ul {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

.content-page li {
    margin-bottom: 0.5rem;
}

.content-page strong {
    font-weight: bold;
}

/* Roadmap Lists */
.roadmap-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.roadmap-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #f5f5f5;
    border: 2px solid var(--black);
}

.roadmap-list.completed li {
    background: #d4edda;
    border-color: var(--success);
}

.roadmap-list.in-progress li {
    background: #fff3cd;
    border-color: var(--primary);
}

.roadmap-list.planned li {
    background: #e7f3ff;
    border-color: var(--secondary);
}

.roadmap-list.future li {
    background: #f5f5f5;
    border-color: #999;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .content-page {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}
