:root {
    --bg-main: #0b0b0c;
    --bg-card: #111214;
    --bg-elevated: #1a1b1e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: #4f8cff;
    --accent-hover: #6aa0ff;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    --bg: var(--bg-main);
    --surface: var(--bg-card);
    --surface-strong: var(--bg-elevated);
    --surface-soft: var(--bg-elevated);
    --border: var(--border-subtle);
    --text: var(--text-primary);
    --muted: var(--text-secondary);
}

* {
    box-sizing: border-box;
    transition: all 0.15s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Instrument Sans', sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(79, 140, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.05), transparent 28%),
        linear-gradient(180deg, #101114 0%, var(--bg-main) 100%);
}

h1,
h2,
h3,
.h1,
.h2,
.h3,
.h4,
.h5 {
    font-weight: 600;
    color: var(--text-primary);
}

.text-muted-soft,
.text-secondary,
.text-light-emphasis {
    color: var(--text-secondary) !important;
    opacity: 1;
}

.text-muted {
    color: var(--text-muted) !important;
    opacity: 1;
}

.navbar,
footer {
    background: rgba(11, 11, 12, 0.78);
    backdrop-filter: blur(14px);
}

.navbar-brand {
    letter-spacing: 0.04em;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 0.65rem 0.8rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 140, 255, 0.16);
}

.navbar .nav-link,
.navbar .navbar-text {
    font-weight: 600;
}

.site-shell {
    min-height: calc(100vh - 146px);
}

.hero-card,
.cta-block,
.auth-card,
.panel-card,
.detail-panel,
.prompt-card,
.stat-card,
.empty-state {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-card,
.cta-block,
.auth-card,
.panel-card,
.detail-panel,
.empty-state {
    padding: var(--space-lg);
}

.cta-block {
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.16), transparent 42%),
        var(--bg-card);
}

.eyebrow {
    display: inline-block;
    margin-bottom: var(--space-md);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    border: 1px solid rgba(79, 140, 255, 0.2);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-panel {
    padding: var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.filter-panel .btn,
.filter-panel .form-select {
    min-height: 46px;
}

.section {
    margin-bottom: var(--space-xl);
}

.prompt-grid {
    column-count: 1;
    column-gap: var(--space-lg);
}

.prompt-card {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: var(--space-lg);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.prompt-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.prompt-card-body {
    padding: var(--space-md);
}

.prompt-image-link,
.detail-image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--bg-elevated);
}

.prompt-image {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.prompt-image-natural {
    height: auto;
    object-fit: contain;
}

.prompt-image-placeholder,
.detail-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 260px;
    padding: var(--space-lg);
    background:
        linear-gradient(135deg, rgba(79, 140, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    color: var(--text-secondary);
    text-align: center;
    font-weight: 600;
}

.detail-image-placeholder {
    min-height: 440px;
}

.prompt-card:hover .prompt-image {
    transform: scale(1.03);
}

.detail-image-wrap {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
}

.detail-media-viewer {
    position: relative;
    min-height: 440px;
    aspect-ratio: var(--detail-media-aspect, auto);
    background: #05070a;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.detail-media-toggle {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(8, 13, 20, 0.72);
    backdrop-filter: blur(10px);
}

.detail-audio-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    background: rgba(8, 13, 20, 0.78);
    color: var(--text-primary);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.detail-audio-toggle.is-unmuted {
    background: rgba(255, 255, 255, 0.18);
}

.detail-media-toggle-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-media-toggle-btn.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.detail-media-pane {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.detail-media-pane.is-active {
    display: block;
}

.detail-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.detail-video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-width: 100%;
    min-height: 100%;
    background: #05070a;
    object-fit: cover;
    transform: translate3d(var(--detail-video-shift-x, 0), var(--detail-video-shift-y, 0), 0) scale(var(--detail-video-scale, 1));
    transform-origin: 50% 50%;
}

.detail-layout > [class*='col-'] {
    min-width: 0;
}

.video-cta-banner {
    position: absolute;
    top: 76px;
    left: 18px;
    right: 18px;
    z-index: 3;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease;
}

.video-cta-banner.is-hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.video-cta-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(9, 14, 21, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}

.video-cta-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}

.detail-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 999px;
    padding: 0.8rem 1.15rem;
    background: rgba(9, 14, 21, 0.86);
    color: var(--text-primary);
    font-weight: 700;
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.detail-video-play__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.95rem;
}

.detail-video-play__label {
    white-space: nowrap;
}

.prompt-preview {
    position: relative;
    overflow: hidden;
    max-height: 92px;
    transition: max-height 0.25s ease;
}

.prompt-preview::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 54px;
    background: linear-gradient(180deg, rgba(15, 23, 32, 0) 0%, rgba(15, 23, 32, 0.98) 100%);
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.prompt-preview.is-open::after {
    opacity: 0;
}

.prompt-preview.is-open {
    max-height: 1200px;
}

.prompt-code,
.prompt-textarea {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt-code {
    padding: 1rem;
    margin: 0;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.prompt-panel {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

.share-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.share-icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.05rem;
}

.share-icon-btn i {
    line-height: 1;
}

.upload-image-preview {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
}

.upload-image-preview__image {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    object-fit: cover;
}

.editor-subtabs-shell {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
}

.editor-subtabs {
    gap: 0.5rem;
}

.editor-subtabs .nav-link {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
}

.editor-subtabs .nav-link.active {
    background: rgba(79, 140, 255, 0.16);
    border-color: rgba(79, 140, 255, 0.4);
    color: var(--text-primary);
}

.platform-crop-editor {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
}

.platform-crop-stage {
    position: relative;
    width: 100%;
    min-height: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
    background-position: 0 0, 12px 12px;
    background-size: 24px 24px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.platform-crop-stage.is-dragging {
    cursor: grabbing;
}

.platform-crop-stage__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.platform-crop-box {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 0.75rem;
    box-shadow: 0 0 0 9999px rgba(10, 13, 20, 0.48);
    pointer-events: none;
}

.platform-crop-preview {
    width: 100%;
    max-height: 280px;
    margin-top: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.24);
    object-fit: contain;
}

.success-panel {
    background: rgba(79, 140, 255, 0.15);
    border: 1px solid rgba(79, 140, 255, 0.28);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.success-actions {
    margin-top: 16px;
}

.profile-card {
    position: sticky;
    top: 1.5rem;
}

.profile-hero {
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.16), transparent 38%),
        var(--bg-card);
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.26) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.profile-section-nav {
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.profile-section-nav .btn {
    min-width: 7rem;
    border-radius: 999px;
}

.profile-folders-panel {
    position: sticky;
    top: 1.5rem;
}

.profile-settings-panel {
    max-width: 840px;
    margin: 0 auto;
}

.profile-folder-bank {
    display: grid;
    gap: 0.75rem;
}

.prompt-folder-list {
    display: grid;
    gap: 0.65rem;
}

.prompt-folder-stack {
    display: grid;
    gap: 0.5rem;
}

.prompt-folder-link {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.prompt-folder-link:hover,
.prompt-folder-link.is-active {
    color: var(--text-primary);
    border-color: rgba(79, 140, 255, 0.35);
    background: rgba(79, 140, 255, 0.14);
    transform: translateY(-1px);
}

.prompt-folder-link.is-drop-target {
    border-color: rgba(79, 140, 255, 0.55);
    background: rgba(79, 140, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.2);
}

.prompt-folder-form .form-control {
    background: rgba(255, 255, 255, 0.05);
}

.js-card-folder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.folder-badge-remove {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    line-height: 1;
    font-size: 0.95rem;
    opacity: 0.8;
}

.folder-badge-remove:hover,
.folder-badge-remove:focus {
    opacity: 1;
}

.js-bank-card[draggable="true"] {
    cursor: grab;
}

.js-bank-card.is-dragging {
    opacity: 0.55;
    transform: scale(0.985);
}

@media (min-width: 992px) {
    .profile-folder-bank {
        position: sticky;
        top: 1.5rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        padding-right: 0.35rem;
    }
}

@media (max-width: 991.98px) {
    .profile-folders-panel {
        position: static;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.9rem;
        padding: 1rem;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        background: rgba(15, 18, 24, 0.96);
        box-shadow: var(--shadow);
    }

    .navbar .d-flex.flex-column.flex-lg-row .btn,
    .navbar .d-flex.flex-column.flex-lg-row .navbar-text {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .interaction-bar-primary {
        width: 100%;
    }
}

.tag-list,
.tag-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tag-pill:hover,
.tag-pill.is-active,
.tag-pill.is-static {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

.tag-pill:hover {
    transform: scale(1.05);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-new,
.badge-private,
.badge-featured,
.badge-score,
.badge-neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.badge-variation,
.badge-info,
.badge-creator,
.badge-creator-rising,
.badge-creator-top {
    background: rgba(79, 140, 255, 0.2);
    color: var(--text-primary);
    border-color: rgba(79, 140, 255, 0.25);
}

.badge-score {
    color: var(--text-secondary);
}

.badge-creator-top {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.16);
}

.badge-creator-rising {
    background: rgba(79, 140, 255, 0.14);
}

.variation-empty-badge,
.badge-new {
    max-width: calc(100% - var(--space-lg));
    white-space: normal;
    text-align: left;
    line-height: 1.25;
}

.interaction-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.interaction-bar-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.vote-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.action-chip {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    min-width: 0;
    font-size: 0.78rem;
    line-height: 1;
    padding: 0.35rem 0.55rem;
}

.action-chip:hover,
.action-chip.is-active {
    background: rgba(79, 140, 255, 0.14);
    border-color: rgba(79, 140, 255, 0.22);
    color: var(--text-primary);
}

.vote-active {
    color: var(--accent) !important;
    font-weight: 700;
}

.action-score {
    min-width: 2rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    opacity: 0.9;
}

.action-score.is-updated {
    color: var(--accent);
    transform: scale(1.08);
}

.interaction-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.favorite-action {
    border-radius: 999px;
}

.action-chip-save {
    white-space: nowrap;
}

.favorite-action.is-active {
    background: rgba(79, 140, 255, 0.14);
    border-color: rgba(79, 140, 255, 0.22);
    color: var(--text-primary);
}

.btn-favorite.active,
.favorite-action.active {
    background: #ff4d6d;
    border-color: #ff4d6d;
    color: #fff;
    transform: scale(1.1);
    transition: 0.15s ease;
}

.autocomplete-suggestions {
    position: absolute;
    top: calc(100% - 0.15rem);
    left: 0.75rem;
    right: 0.75rem;
    z-index: 20;
    overflow: hidden;
    border-radius: 16px;
}

.prompt-textarea,
.form-control,
.form-select,
.modal-content {
    background-color: var(--bg-elevated);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.input {
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.prompt-textarea:focus,
.form-control:focus,
.form-select:focus {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border-color: rgba(79, 140, 255, 0.6);
    box-shadow: 0 0 0 0.25rem rgba(79, 140, 255, 0.14);
}

textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.input:focus {
    border-color: var(--accent);
}

.input-error {
    border-color: #ef4444 !important;
}

.input-success {
    border-color: #22c55e !important;
}

.validation-message {
    min-height: 1rem;
    font-size: 13px;
    margin-top: 6px;
}

.validation-error {
    color: #fca5a5;
}

.validation-success {
    color: #86efac;
}

.form-control.is-invalid,
.form-select.is-invalid,
.prompt-textarea.is-invalid {
    border-color: #ff7c7c;
    box-shadow: 0 0 0 0.2rem rgba(255, 124, 124, 0.12);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
.prompt-textarea.is-invalid:focus {
    border-color: #ff8d8d;
    box-shadow: 0 0 0 0.25rem rgba(255, 124, 124, 0.18);
}

.invalid-feedback {
    color: #ffb3b3;
    font-size: 0.9rem;
}

.form-control::file-selector-button {
    color: var(--text-primary);
    background: rgba(79, 140, 255, 0.16);
    border: 0;
}

.btn-primary {
    background: var(--accent);
    border: none;
    color: var(--text-primary);
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-hover);
    color: var(--text-primary);
}

.google-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    font-weight: 600;
}

.google-auth-btn-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.btn-secondary,
.btn-outline-light,
.btn-outline-warning,
.btn-outline-danger {
    background: transparent;
    border-width: 1px;
    border-color: var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
}

.btn-outline-light {
    opacity: 0.85;
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

.btn-sm,
.action-chip,
.favorite-action {
    min-height: 42px;
}

button:hover,
.btn:hover {
    filter: brightness(1.1);
}

button:active,
.btn:active {
    transform: scale(0.96);
}

.badge-info {
    color: var(--text-primary);
}

.stat-card {
    padding: 1.2rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
}

.category-row {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.campaign-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.campaign-item[open] {
    background: rgba(255, 255, 255, 0.055);
}

.campaign-item__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
    list-style: none;
}

.campaign-item__summary::-webkit-details-marker {
    display: none;
}

.campaign-item__summary-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.campaign-item__summary-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.campaign-item__body {
    padding: 0 1.1rem 1.1rem;
}

.admin-thumb-cell {
    width: 88px;
}

.admin-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
}

.admin-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.admin-meta-field {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 700;
}

.admin-meta-field[readonly] {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    opacity: 1;
    box-shadow: none;
    cursor: default;
}

.admin-table {
    --admin-table-border: rgba(255, 255, 255, 0.12);
    --admin-table-muted: rgba(255, 255, 255, 0.82);
}

.admin-table > :not(caption) > * > * {
    border-bottom-color: var(--admin-table-border);
}

.admin-table thead th {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-table tbody td,
.admin-table tbody td .text-light-emphasis,
.admin-table tbody td.small {
    color: var(--admin-table-muted) !important;
}

.admin-table a.link-light {
    color: #ffffff !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

.admin-table .fw-semibold,
.admin-table strong {
    color: #ffffff;
}

.admin-table .badge {
    color: #f7fafc;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.admin-table .bg-secondary-subtle {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.admin-table .bg-primary-subtle {
    background: rgba(87, 122, 255, 0.26) !important;
    color: #f7fbff !important;
    border-color: rgba(87, 122, 255, 0.34) !important;
}

.admin-table .bg-danger-subtle {
    background: rgba(255, 99, 132, 0.22) !important;
    color: #fff0f3 !important;
    border-color: rgba(255, 99, 132, 0.32) !important;
}

.admin-table .bg-secondary,
.admin-table .bg-success,
.admin-table .bg-warning,
.admin-table .bg-info {
    color: #111827 !important;
}

.admin-table .bg-secondary {
    background: #9ca3af !important;
}

.admin-table .bg-success {
    background: #34d399 !important;
}

.admin-table .bg-warning {
    background: #fbbf24 !important;
}

.admin-table .bg-info {
    background: #67e8f9 !important;
}

.admin-table .btn {
    font-weight: 700;
}

.admin-table .btn-outline-light,
.admin-table .btn-outline-warning,
.admin-table .btn-outline-danger,
.admin-table .btn-outline-dark {
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
}

.admin-table .btn-outline-light {
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.22);
}

.admin-table .btn-outline-warning {
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.4);
}

.admin-table .btn-outline-danger {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.42);
}

.admin-table .btn-outline-dark {
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.32);
}

.admin-table .btn-outline-light:hover,
.admin-table .btn-outline-light:focus,
.admin-table .btn-outline-warning:hover,
.admin-table .btn-outline-warning:focus,
.admin-table .btn-outline-danger:hover,
.admin-table .btn-outline-danger:focus,
.admin-table .btn-outline-dark:hover,
.admin-table .btn-outline-dark:focus {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.1);
}

.empty-state {
    padding: 3rem 1.5rem;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 500;
    border: 1px solid transparent;
    animation: fadeInUp 0.25s ease;
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.alert-text {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.alert-icon {
    flex: 0 0 auto;
    font-size: 0.95rem;
    line-height: 1;
}

.alert-controls,
.alert-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.alert-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    color: #d1fae5;
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

.alert .btn {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

.alert .btn:hover,
.alert .btn:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-feedback {
    min-height: 1.15rem;
    margin-top: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0;
}

.action-feedback.is-visible {
    opacity: 1;
}

.toast-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    z-index: 1080;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.toast-feedback.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.post-bank-modal {
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.14), transparent 46%),
        var(--bg-elevated);
}

.post-bank-folder-list {
    display: grid;
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
}

.post-bank-folder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.post-bank-folder-copy {
    min-width: 0;
}

.post-bank-empty {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.prompt-image-link::after {
    content: 'View prompt ->';
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.88);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
}

.prompt-card:hover .prompt-image-link::after {
    opacity: 1;
}

@media (hover: none), (pointer: coarse) {
    .prompt-card:hover {
        transform: none;
        border-color: var(--border-subtle);
        box-shadow: var(--shadow);
    }

    .prompt-card:hover .prompt-image {
        transform: none;
    }

    .prompt-card:hover .prompt-image-link::after {
        opacity: 0;
    }

    .tag-pill:hover {
        transform: none;
    }

    button:hover,
    .btn:hover {
        filter: none;
    }
}

@media (min-width: 768px) {
    .prompt-grid {
        column-count: 2;
    }
}

@media (max-width: 767.98px) {
    .site-shell {
        padding-top: 0.5rem;
    }

    .navbar {
        position: sticky;
        top: 0;
        z-index: 1040;
    }

    .navbar .container {
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-collapse {
        margin-top: 0.9rem;
        padding: 1rem;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        background: rgba(15, 18, 24, 0.96);
        box-shadow: var(--shadow);
    }

    .navbar-nav {
        gap: 0.35rem;
    }

    .navbar .nav-link,
    .navbar .dropdown-toggle,
    .navbar .dropdown-item {
        min-height: 46px;
        display: flex;
        align-items: center;
        border-radius: 12px;
    }

    .navbar .dropdown-menu {
        margin-top: 0.5rem;
        border-radius: 14px;
        border-color: var(--border-subtle);
    }

    .navbar .d-flex.flex-column.flex-lg-row {
        padding-top: 0.85rem;
        border-top: 1px solid var(--border-subtle);
    }

    .navbar .d-flex.flex-column.flex-lg-row .btn,
    .navbar .d-flex.flex-column.flex-lg-row .navbar-text {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-card .display-5 {
        font-size: clamp(2rem, 9vw, 2.6rem);
        line-height: 1.02;
    }

    .hero-card,
    .cta-block,
    .panel-card,
    .auth-card,
    .detail-panel,
    .empty-state {
        padding: 1.1rem;
    }

    .filter-panel {
        padding: 1rem;
    }

    .filter-panel .d-flex {
        flex-direction: column;
    }

    .filter-panel .btn,
    .filter-panel .form-select {
        width: 100%;
    }

    .prompt-grid {
        column-gap: 0;
    }

    .prompt-card {
        margin-bottom: 1rem;
    }

    .prompt-card-body {
        padding: 0.9rem;
    }

    .prompt-image {
        height: min(72vw, 320px);
    }

    .interaction-bar {
        align-items: stretch;
    }

    .interaction-bar-primary {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

    .interaction-bar-primary > .btn,
    .interaction-bar-primary > .action-chip {
        width: 100%;
        justify-content: center;
    }

    .vote-controls {
        width: 100%;
        justify-content: space-between;
        padding: 0.25rem 0;
    }

    .vote-controls .action-chip {
        min-width: 52px;
        min-height: 44px;
    }

    .action-score {
        flex: 1 1 auto;
        font-size: 0.95rem;
    }

    .share-box {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .share-box > .btn-primary:first-child,
    .share-box > .btn-primary:last-child {
        grid-column: 1 / -1;
    }

    .share-icon-btn,
    .share-box .btn {
        width: 100%;
        min-height: 48px;
        height: auto;
    }

    .detail-media-viewer,
    .detail-video,
    .detail-image-placeholder {
        min-height: 320px;
    }

    .detail-media-toggle {
        top: 12px;
        left: 12px;
        right: 72px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 5px;
    }

    .detail-audio-toggle {
        top: 12px;
        right: 12px;
        min-height: 42px;
        padding-inline: 0.85rem;
    }

    .detail-media-toggle-btn {
        min-height: 42px;
        text-align: center;
    }

    .video-cta-banner {
        top: 68px;
        left: 12px;
        right: 12px;
    }

    .video-cta-banner__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem;
    }

    .video-cta-banner__inner .btn {
        width: 100%;
        min-height: 46px;
    }

    .detail-video-play {
        padding: 0.75rem 1rem;
        min-height: 50px;
    }

    .cta-block .d-flex,
    .success-panel .share-box {
        align-items: stretch !important;
    }

    .cta-block .btn,
    .success-panel .btn {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .prompt-grid {
        column-count: 3;
    }

    .hero-card,
    .cta-block,
    .auth-card,
    .panel-card,
    .detail-panel {
        padding: var(--space-xl);
    }
}
