body.create-post-page {
    min-height: 100vh;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(187, 134, 252, 0.12) 0%, transparent 26%),
        radial-gradient(circle at 88% 18%, rgba(3, 218, 198, 0.08) 0%, transparent 20%),
        linear-gradient(180deg, #050505 0%, #0a0a0f 40%, #050505 100%);
}

body.create-post-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, black 32%, transparent 86%);
    -webkit-mask-image: radial-gradient(circle at center, black 32%, transparent 86%);
    opacity: 0.5;
}

.create-main {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem 5rem;
    margin-top: 80px;
}

.create-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
    gap: 2rem;
    align-items: start;
}

.create-card {
    padding: 2.5rem;
}

.create-header {
    margin-bottom: 2rem;
}

.create-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(187, 134, 252, 0.15);
    border: 1px solid rgba(187, 134, 252, 0.3);
    color: #e2c6ff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.create-header h1 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.create-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.05rem;
}

.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.author-badge-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(187, 134, 252, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.author-badge-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-info small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.author-info strong {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.create-form {
    display: grid;
    gap: 1.5rem;
}

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

.form-group {
    display: grid;
    gap: 0.6rem;
    position: relative;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.char-counter {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.char-counter.warning {
    color: #ffb0b0;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

#postImageUrls {
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #bb86fc;
    box-shadow:
        0 0 0 4px rgba(187, 134, 252, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.form-group select option {
    background: #121212;
    color: #fff;
}

.form-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.2rem;
}

.upload-zone {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #bb86fc;
    background: rgba(187, 134, 252, 0.05);
}

.upload-zone.has-files {
    border-color: rgba(3, 218, 198, 0.7);
    background: rgba(3, 218, 198, 0.05);
}

.upload-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.upload-text {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.35rem;
}

.upload-hint {
    margin-top: 0;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.15rem;
}

.file-actions[hidden] {
    display: none;
}

.file-clear-btn {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
}

.existing-images-group[hidden] {
    display: none;
}

.existing-images-head {
    display: grid;
    gap: 0.35rem;
}

.existing-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 0.25rem;
}

.existing-image-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.existing-image-media {
    position: relative;
    width: 100%;
    height: 100%;
}

.existing-image-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.existing-image-badge {
    position: absolute;
    left: 0.55rem;
    bottom: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.existing-image-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1;
}

.existing-image-remove:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: scale(1.08);
}

.message {
    display: none;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    font-weight: 500;
}

.message.is-visible {
    display: block;
}

.message-error {
    background: rgba(255, 107, 107, 0.12);
    color: #ffb0b0;
    border: 1px solid rgba(255, 107, 107, 0.24);
}

.message-success {
    background: rgba(64, 192, 87, 0.12);
    color: #9cf0b0;
    border: 1px solid rgba(64, 192, 87, 0.24);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-panel {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 1.5rem;
}

.preview-card,
.tips-card {
    padding: 1.8rem;
}

.preview-card h2,
.tips-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.preview-card p,
.tips-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.preview-shell {
    margin-top: 1.5rem;
}

.preview-post-card {
    display: flex;
    flex-direction: column;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.preview-post-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 1.2rem 0;
}

.preview-post-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(187, 134, 252, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.preview-post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-post-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.preview-post-author-name .verified-badge-icon {
    flex-shrink: 0;
    color: #03dac6;
}

.preview-post-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.preview-post-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
}

.preview-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-post-media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.16) 0%, rgba(3, 218, 198, 0.1) 100%);
}

.preview-post-category-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-post-gallery-badge {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-post-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.preview-post-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    word-break: break-word;
}

.preview-post-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.preview-post-excerpt .post-inline-link {
    color: #9fe8ff;
    text-decoration: underline;
    text-decoration-color: rgba(159, 232, 255, 0.42);
    text-underline-offset: 0.18em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.preview-post-excerpt .post-inline-link:hover,
.preview-post-excerpt .post-inline-link:focus-visible {
    color: #d8f8ff;
    text-decoration-color: rgba(216, 248, 255, 0.8);
    outline: none;
}

.preview-post-location {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.86rem;
}

.tips-list {
    list-style: none;
    display: grid;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.tips-list li {
    color: rgba(255, 255, 255, 0.7);
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tips-list li::before {
    content: '✨';
    position: absolute;
    left: 0;
    font-size: 0.9rem;
}

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

    .preview-panel {
        position: static;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .create-main {
        padding: 1rem;
        padding-bottom: 5rem;
    }

    .create-card {
        padding: 1.5rem;
    }

    .preview-panel {
        grid-template-columns: 1fr;
    }

    .preview-card,
    .tips-card {
        padding: 1.35rem;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}
