.editor-container {
    margin-left: 2vw;
    margin-right: 2vw;
}
@media (max-width: 600px) {
    .header-right {
        gap: 0.7rem;
        margin-right: 1rem;
    }
    .editor-container {
        margin-right: 1rem;
    }
}
/* Modern dark theme for category dropdown */
#blog-category {
    background: #263040;
    color: #cbd5e1;
    border: 1px solid #313a48;
    border-radius: 4px;
    padding: 10px;
    font-size: 1rem;
    font-family: 'Code Sans Pro', monospace;
    margin-bottom: 8px;
    box-sizing: border-box;
    appearance: none;
    outline: none;
    transition: border-color 0.2s;
}
#blog-category:focus {
    border-color: #f472b6;
}
/* Unset main-content max-width for editor page */
.main-content {
    max-width: none !important;
}
/* editor.css - Improved mobile layout for editor page */

.content-admin-section {
    margin-top: 3rem;
    border-top: 1px solid #3a4454;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.content-admin-header h2 {
    margin: 0;
    font-size: 1.9rem;
    color: #cbd5e1;
    letter-spacing: 1px;
}

.content-admin-status {
    font-size: 0.9rem;
    min-height: 1.2rem;
    color: #9aa5b1;
}

.content-admin-status.success { color: #a6f472; }
.content-admin-status.error { color: #f472b6; }
.content-admin-status.loading { color: #9aa5b1; }

.content-admin-table-wrapper {
    border: 1px solid #313a48;
    border-radius: 8px;
    overflow: hidden;
    background: #263040;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    overflow-x: auto;
}

.content-admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.content-admin-table thead {
    background: #2f394a;
}

.content-admin-table th,
.content-admin-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    color: #cbd5e1;
    border-bottom: 1px solid #313a48;
}

.content-admin-table tbody tr:last-child td {
    border-bottom: none;
}

.content-admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.content-title-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.content-title-link {
    color: #f8f9fc;
    font-weight: 600;
    font-size: 1rem;
}

.content-title-link:hover {
    color: #f472b6;
}

.content-category-label {
    font-size: 0.75rem;
    color: #9aa5b1;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.content-status-cell {
    text-align: center;
    white-space: nowrap;
}

.content-status-cell .status-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-flex;
    background: #a6f472;
    box-shadow: 0 0 0 4px rgba(166, 244, 114, 0.15);
}

.status-indicator.pending {
    background: #facc15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

.status-indicator.draft {
    background: #7c8590;
    box-shadow: 0 0 0 4px rgba(124, 133, 144, 0.12);
}

.status-text {
    font-size: 0.85rem;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: #cbd5e1;
}

.content-actions-cell {
    text-align: right;
    white-space: nowrap;
}
.content-actions-cell .actions-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.content-delete-btn {
    background: transparent;
    color: #f8b6d5;
    border: 1px solid #f472b6;
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    font-family: 'Code Sans Pro', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.content-delete-btn:hover,
.content-delete-btn:focus {
    background: rgba(244, 114, 182, 0.18);
    color: #ffffff;
    border-color: #f68abf;
    outline: none;
}

.content-edit-link {
    color: #9aa5b1;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.7rem;
    border: 1px solid #3a4454;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.content-edit-link:hover {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.6);
    background: rgba(244, 114, 182, 0.12);
}

.status-col { width: 160px; text-align: center; }
.actions-col { width: 200px; text-align: right; }
.content-admin-table td.status-col { text-align: center; }
.content-admin-table td.actions-col { text-align: right; }

@media (max-width: 900px) {
    .content-admin-table { min-width: 600px; }
    .content-actions-cell {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .content-admin-table {
        min-width: 0;
        border: 0;
    }
    .content-admin-table thead {
        display: none;
    }
    .content-admin-table tbody {
        display: block;
    }
    .content-admin-table tbody tr {
        display: block;
        background: linear-gradient(150deg, #2c3544 0%, #262f3d 100%);
        border: 1px solid rgba(49, 58, 72, 0.9);
        border-radius: 10px;
        margin-bottom: 1.1rem;
        padding: 1rem 1.15rem;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
    }
    .content-admin-table tbody tr:last-child {
        margin-bottom: 0;
    }
    .content-admin-table tbody tr td {
        display: block;
        padding: 0.55rem 0;
        border-bottom: none;
        text-align: left;
        white-space: normal;
    }
    .content-admin-table tbody tr td.status-col,
    .content-admin-table tbody tr td.actions-col {
        width: auto;
    }
    .content-admin-table tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #9aa5b1;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        display: block;
        font-size: 0.7rem;
        margin-bottom: 0.35rem;
    }
    .content-admin-table tbody tr td:first-child {
        padding-top: 0.25rem;
    }
    .content-admin-table tbody tr td:last-child {
        padding-bottom: 0.15rem;
    }
    .content-admin-table tbody tr td .content-title-cell {
        flex: 1 1 auto;
    }
    .content-admin-table tbody tr td.content-status-cell .status-wrapper {
        justify-content: flex-start;
    }
    .content-admin-table tbody tr td.content-actions-cell .actions-wrapper {
        display: flex;
        gap: 0.45rem;
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
    }
    .content-admin-table tbody tr td.content-actions-cell .actions-wrapper .content-edit-link,
    .content-admin-table tbody tr td.content-actions-cell .actions-wrapper .content-delete-btn {
        flex: 1 1 calc(50% - 0.45rem);
        min-width: 7rem;
        padding: 0.42rem 0.55rem;
        font-size: 0.78rem;
        text-align: center;
    }
    .content-admin-table tbody tr td.content-actions-cell .actions-wrapper .content-delete-btn {
        flex-basis: 100%;
    }
    .content-admin-table tbody tr td.content-actions-cell::before {
        margin-bottom: 0.4rem;
    }
    .content-admin-table tbody tr.content-table-state {
        padding: 1rem;
        text-align: center;
    }
    .content-admin-table tbody tr.content-table-state td {
        display: block;
        padding: 0;
    }
    .content-admin-table tbody tr.content-table-state td::before {
        content: none;
    }
}

body {
    background: #232a36;
    color: #7c8590;
    font-family: 'Code Sans Pro', monospace;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.editor-container {
    margin: 40px auto;
    padding: 2rem;
    max-width: 1600px;
    width: 98vw;
    background: #313a48;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 2px 8px #232a36;
}

.editor-title {
    text-align: center;
    font-family: 'Code Sans Pro', monospace;
    font-size: 2.5rem;
    color: #cbd5e1;
    margin: 32px 0 24px 0;
    letter-spacing: 2px;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.editor-row {
    display: flex;
    gap: 32px;
}

.editor-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-form label {
    font-family: 'Code Sans Pro', monospace;
    font-weight: bold;
    color: #cbd5e1;
    font-size: 1.1rem;
}

.editor-form input,
.editor-form textarea {
    width: 100%;
    font-family: 'Code Sans Pro', monospace;
    font-size: 1rem;
    background: #263040;
    color: #cbd5e1;
    border: 1px solid #313a48;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.editor-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.editor-toolbar button {
    background: #263040;
    color: #7c8590;
    border: 1px solid #313a48;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Code Sans Pro', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.editor-toolbar button:hover {
    background: #313a48;
    color: #f472b6;
}
.editor-toolbar .bang-block-control {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}
.editor-toolbar .bang-block-toggle {
    background: #263040;
    border: 1px solid #313a48;
    border-left: none;
    color: #7c8590;
    padding: 8px 10px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: 'Code Sans Pro', monospace;
}
.editor-toolbar .bang-block-control #bang-block-btn {
    border-radius: 4px 0 0 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.editor-toolbar .bang-block-toggle:hover {
    background: #313a48;
    color: #f472b6;
}
.editor-toolbar .bang-arrow {
    display: inline-block;
    transform: translateY(-1px);
}
.editor-toolbar .bang-block-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 160px;
    background: #232a36;
    border: 1px solid #313a48;
    border-radius: 6px;
    box-shadow: 0 12px 20px rgba(0,0,0,0.35);
    padding: 6px;
    display: none;
    z-index: 20;
}
.editor-toolbar .bang-block-menu.is-open {
    display: block;
}
.editor-toolbar .bang-block-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-family: 'Code Sans Pro', monospace;
    font-size: 0.9rem;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}
.editor-toolbar .bang-block-option:hover {
    background: #2c3544;
    color: #f472b6;
}
.editor-toolbar .bang-block-option.is-selected {
    background: rgba(244, 114, 182, 0.12);
    color: #f472b6;
}
.editor-toolbar .bang-block-option.is-selected .bang-color-swatch {
    border-color: #f472b6;
}
.editor-toolbar .bang-block-button-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid #313a48;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
    flex: 0 0 auto;
}
.editor-toolbar .bang-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #313a48;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}

.editor-main {
    display: flex;
    gap: 32px;
    width: 100%;
    justify-content: space-between;
}

.editor-area {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-area textarea {
    min-height: 300px;
}

.editor-preview {
    background: #232a36;
    padding: 32px 24px;
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 300px;
    color: #cbd5e1;
    font-family: 'Code Sans Pro', monospace;
    overflow-y: auto;
    border: 1px solid #313a48;
}

.editor-preview img {
    max-width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
    margin: 1.25rem auto;
}

.editor-publish {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 0;
}

.editor-publish-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.editor-publish label {
    font-weight: bold;
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 0;
    margin-right: 8px;
}

.editor-publish input[type="date"] {
    width: 200px;
    background: #263040;
    color: #cbd5e1;
    border: 1px solid #313a48;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Code Sans Pro', monospace;
    font-size: 1.1rem;
    height: 40px;
    margin-bottom: 0;
}

.editor-publish button {
    background: #263040;
    color: #cbd5e1;
    border: 1px solid #313a48;
    border-radius: 4px;
    padding: 10px 24px;
    font-family: 'Code Sans Pro', monospace;
    font-size: 1.1rem;
    cursor: pointer;
    height: 40px;
    margin-left: 16px;
}

.editor-publish span {
    color: #a6f472;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    height: 40px;
    margin-left: 8px;
}

.gallery-admin-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid #3a4454;
}

.gallery-admin-heading {
    font-size: 1.8rem;
    color: #cbd5e1;
    margin: 0 0 0.75rem 0;
    letter-spacing: 1px;
}

.gallery-admin-note {
    margin: 0 0 1.75rem 0;
    color: #9aa5b1;
    font-size: 0.95rem;
}

.gallery-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-upload-form .editor-row {
    align-items: flex-end;
}

.gallery-help {
    display: block;
    margin-top: -0.4rem;
    font-size: 0.75rem;
    color: #9aa5b1;
}

.gallery-upload-button-col {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.gallery-upload-btn {
    background: #f472b6;
    color: #1d232d;
    border: 1px solid #f472b6;
    border-radius: 4px;
    padding: 0.75rem 1.6rem;
    font-family: 'Code Sans Pro', monospace;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.gallery-upload-btn:hover {
    background: #f68abf;
    color: #1d232d;
}

.gallery-upload-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.gallery-upload-status.loading {
    color: #9aa5b1;
}

.gallery-upload-status.success {
    color: #a6f472;
}

.gallery-upload-status.error {
    color: #f472b6;
}

.gallery-admin-list {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-admin-card {
    background: #263040;
    border: 1px solid #313a48;
    border-radius: 8px;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.gallery-admin-card img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    object-fit: cover;
    max-height: 160px;
}

.gallery-admin-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #cbd5e1;
}

.gallery-admin-card time {
    font-size: 0.75rem;
    color: #9aa5b1;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.admin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-tags span {
    background: rgba(244, 114, 182, 0.18);
    color: #f8b6d5;
    padding: 0.25rem 0.45rem;
    border-radius: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.gallery-admin-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.gallery-delete-btn {
    background: transparent;
    color: #f8b6d5;
    border: 1px solid #f472b6;
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    font-family: 'Code Sans Pro', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.gallery-delete-btn:hover,
.gallery-delete-btn:focus {
    background: rgba(244, 114, 182, 0.18);
    color: #ffffff;
    border-color: #f68abf;
    outline: none;
}

@media (max-width: 900px) {
    .editor-row,
    .editor-main {
        flex-direction: column;
        gap: 24px;
    }
    .editor-col,
    .editor-area {
        max-width: 100%;
        min-width: 0;
    }
    .editor-form input,
    .editor-form textarea {
        font-size: 1rem;
        padding: 12px;
    }
    .editor-area textarea,
    .editor-preview {
        min-height: 160px;
        padding: 16px 8px;
    }
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    .editor-title {
        font-size: 2rem;
    }
    .editor-container {
        max-width: 100vw;
        padding: 0.5rem;
        width: unset;
    }
    .editor-publish {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
    }
    .editor-publish-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .editor-publish label,
    .editor-publish input[type="date"],
    .editor-publish button,
    .editor-publish span {
        margin-left: 0 !important;
        height: auto;
        font-size: 1rem;
    }
    .gallery-upload-form .editor-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .gallery-upload-button-col {
        justify-content: flex-start;
        align-items: stretch;
    }
    .gallery-upload-btn {
        width: 100%;
    }
    .gallery-admin-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
