/*
 * DownloadNext v6.1.0 — DesignSystem Binding
 * Zentrale optische Brücke zu DesignSystemCore.
 * Keine Logikänderung, keine DB-Änderung.
 */

:root{
    --downloadnext-bg:var(--dsc-bg,#090806);
    --downloadnext-surface:var(--dsc-surface,rgba(19,15,11,.94));
    --downloadnext-surface-2:var(--dsc-surface-2,rgba(31,22,13,.88));
    --downloadnext-border:var(--dsc-border,rgba(255,153,0,.24));
    --downloadnext-border-strong:var(--dsc-border-strong,rgba(255,174,63,.46));
    --downloadnext-text:var(--dsc-text,#f4e5cf);
    --downloadnext-muted:var(--dsc-muted,#bda98b);
    --downloadnext-accent:var(--dsc-accent,#ff9800);
    --downloadnext-accent-2:var(--dsc-accent-2,#ffbf6b);
    --downloadnext-radius:var(--dsc-radius,18px);
    --downloadnext-radius-sm:var(--dsc-radius-sm,12px);
    --downloadnext-shadow:var(--dsc-shadow,0 18px 42px rgba(0,0,0,.34));
}

/* Containment: DownloadNext darf nicht in Theme-Seitenleisten ausbrechen. */
.downloadnext-page,
.downloadnext-wrapper,
.downloadnext-admin,
.downloadnext-release,
.downloadnext-list-panel,
.downloadnext-collection-panel,
.downloadnext-report-panel,
.downloadnext-editor-panel{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
}

.forge-center-column .downloadnext-page,
.forge-center-column .downloadnext-wrapper,
main .downloadnext-page,
main .downloadnext-wrapper{
    overflow:hidden;
}

.downloadnext-page *,
.downloadnext-wrapper *,
.downloadnext-admin *{
    box-sizing:border-box;
}

/* Gemeinsame Panel-/Card-Sprache */
.downloadnext-hero,
.downloadnext-filter-panel,
.downloadnext-form,
.downloadnext-admin-list,
.downloadnext-release,
.downloadnext-related,
.downloadnext-review-panel,
.downloadnext-editor-panel,
.downloadnext-list-panel,
.downloadnext-collection-panel,
.downloadnext-report-panel,
.downloadnext-v6-hero,
.downloadnext-v6-box,
.downloadnext-v6-release-panel,
.downloadnext-v6-form-panel,
.downloadnext-widget,
.downloadnext-card,
.downloadnext-my-row,
.downloadnext-review-item,
.downloadnext-collection-card,
.downloadnext-history-row,
.downloadnext-collection-toggle,
.downloadnext-community-summary,
.downloadnext-empty-inline{
    border:1px solid var(--downloadnext-border) !important;
    border-radius:var(--downloadnext-radius) !important;
    background:
        radial-gradient(circle at 10% 0%,rgba(255,139,32,.13),transparent 34%),
        linear-gradient(135deg,var(--downloadnext-surface),rgba(8,8,9,.95)) !important;
    color:var(--downloadnext-text);
    box-shadow:var(--downloadnext-shadow);
}

.downloadnext-hero,
.downloadnext-v6-hero{
    padding:20px !important;
    margin:0 0 18px 0 !important;
    overflow:hidden;
}

.downloadnext-hero h1,
.downloadnext-hero h2,
.downloadnext-header h1,
.downloadnext-header h2,
.downloadnext-card h3,
.downloadnext-release h1,
.downloadnext-release h2,
.downloadnext-related h3,
.downloadnext-admin-list h3,
.downloadnext-section-head h3,
.downloadnext-my-body h4,
.downloadnext-my-titleline h4,
.downloadnext-v6-box h3,
.downloadnext-v6-form-panel h3,
.downloadnext-v6-release-panel h3{
    color:var(--downloadnext-accent-2) !important;
    letter-spacing:.02em;
}

.downloadnext-hero p,
.downloadnext-card p,
.downloadnext-release-description,
.downloadnext-admin-main span,
.downloadnext-my-body p,
.downloadnext-collection-card span,
.downloadnext-history-row span,
.downloadnext-collection-card p,
.downloadnext-review-item p,
.downloadnext-v6-list-row span{
    color:var(--downloadnext-muted) !important;
}

/* Modulnavigation */
.downloadnext-module-nav,
.downloadnext-header-nav,
.downloadnext-report-tabs,
.downloadnext-owner-tools{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    width:100%;
    max-width:100%;
    margin:0 0 16px 0;
}

.downloadnext-nav-pill,
.downloadnext-module-nav a,
.downloadnext-header-nav a,
.downloadnext-report-tabs a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:38px;
    padding:9px 13px !important;
    border-radius:999px !important;
    border:1px solid var(--downloadnext-border) !important;
    background:linear-gradient(180deg,rgba(38,27,17,.94),rgba(12,10,8,.94)) !important;
    color:#f6d7a5 !important;
    text-decoration:none !important;
    font-weight:800;
    box-shadow:0 10px 22px rgba(0,0,0,.24);
}

.downloadnext-nav-pill:hover,
.downloadnext-nav-pill.is-active,
.downloadnext-module-nav a:hover,
.downloadnext-header-nav a:hover,
.downloadnext-report-tabs a:hover{
    border-color:var(--downloadnext-border-strong) !important;
    color:#fff !important;
    transform:translateY(-1px);
}

/* Buttons */
.downloadnext-button,
.downloadnext-form button,
.downloadnext-filters button,
.downloadnext-admin-actions button,
.downloadnext-mini-button,
.downloadnext-mini-button-primary,
.downloadnext-inline-form button,
.downloadnext-card-actions button,
.downloadnext-v6-form button,
.downloadnext-form-actions button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:36px;
    border-radius:12px !important;
    border:1px solid rgba(255,179,71,.38) !important;
    background:linear-gradient(135deg,#ff8a00,#ffb347) !important;
    color:#1b1006 !important;
    padding:9px 13px !important;
    font-weight:900 !important;
    text-decoration:none !important;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(0,0,0,.24);
}

.downloadnext-button:hover,
.downloadnext-form button:hover,
.downloadnext-filters button:hover,
.downloadnext-admin-actions button:hover,
.downloadnext-mini-button:hover,
.downloadnext-mini-button-primary:hover,
.downloadnext-inline-form button:hover{
    filter:brightness(1.08);
    transform:translateY(-1px);
}

.downloadnext-button-ghost,
.downloadnext-mini-button:not(.downloadnext-mini-button-primary){
    background:linear-gradient(180deg,rgba(43,32,20,.94),rgba(14,12,10,.94)) !important;
    color:#ffd39a !important;
    border-color:var(--downloadnext-border) !important;
}

/* Formulare */
.downloadnext-filters input,
.downloadnext-filters select,
.downloadnext-form input,
.downloadnext-form select,
.downloadnext-form textarea,
.downloadnext-edit-form input,
.downloadnext-edit-form select,
.downloadnext-edit-form textarea,
.downloadnext-report-form select,
.downloadnext-report-form textarea,
.downloadnext-review-form select,
.downloadnext-review-form textarea,
.downloadnext-v6-form input,
.downloadnext-v6-form select,
.downloadnext-v6-form textarea{
    width:100%;
    min-width:0;
    border-radius:12px !important;
    border:1px solid rgba(255,153,0,.24) !important;
    background:rgba(0,0,0,.34) !important;
    color:var(--downloadnext-text) !important;
    padding:11px 12px !important;
    outline:none;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}

.downloadnext-filters input:focus,
.downloadnext-filters select:focus,
.downloadnext-form input:focus,
.downloadnext-form select:focus,
.downloadnext-form textarea:focus,
.downloadnext-edit-form input:focus,
.downloadnext-edit-form select:focus,
.downloadnext-edit-form textarea:focus,
.downloadnext-report-form select:focus,
.downloadnext-report-form textarea:focus,
.downloadnext-review-form select:focus,
.downloadnext-review-form textarea:focus,
.downloadnext-v6-form input:focus,
.downloadnext-v6-form select:focus,
.downloadnext-v6-form textarea:focus{
    border-color:var(--downloadnext-accent) !important;
    box-shadow:0 0 0 3px rgba(255,153,0,.14) !important;
}

.downloadnext-field,
.downloadnext-edit-form label,
.downloadnext-report-form label,
.downloadnext-review-form label,
.downloadnext-v6-form label{
    color:#f7dcae !important;
    font-weight:800;
}

/* Grids stabilisieren */
.downloadnext-stats-grid,
.downloadnext-admin-stats,
.downloadnext-v6-dashboard-grid,
.downloadnext-v6-two-col,
.downloadnext-collection-grid,
.downloadnext-related-grid,
.downloadnext-collection-toggle-grid{
    width:100%;
    max-width:100%;
    min-width:0;
}

.downloadnext-filter-panel,
.downloadnext-form,
.downloadnext-admin-list,
.downloadnext-editor-panel,
.downloadnext-list-panel,
.downloadnext-collection-panel,
.downloadnext-report-panel,
.downloadnext-v6-form-panel{
    padding:16px !important;
    margin:0 0 18px 0 !important;
}

.downloadnext-filters{
    grid-template-columns:minmax(180px,2fr) repeat(4,minmax(120px,1fr)) auto auto;
    width:100%;
}

/* Download-/Gamecards */
.downloadnext-grid{
    width:100%;
    max-width:100%;
    display:grid !important;
    grid-template-columns:repeat(auto-fill,minmax(280px,350px)) !important;
    justify-content:start !important;
    align-items:start !important;
    gap:18px !important;
}

.downloadnext-card{
    width:100% !important;
    max-width:350px !important;
    min-width:0 !important;
    overflow:hidden !important;
    padding:0 !important;
    transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}

.downloadnext-card:hover,
.downloadnext-collection-card:hover,
.downloadnext-history-row:hover{
    transform:translateY(-2px);
    border-color:var(--downloadnext-border-strong) !important;
    box-shadow:0 22px 48px rgba(0,0,0,.40);
}

.downloadnext-card-body{
    padding:16px !important;
    min-width:0;
}

.downloadnext-grid .downloadnext-card > .downloadnext-cover{
    width:100% !important;
    max-width:350px !important;
    min-height:0 !important;
    overflow:hidden !important;
    border-radius:var(--downloadnext-radius) var(--downloadnext-radius) 0 0 !important;
    border-bottom:1px solid rgba(255,153,0,.20);
}

.downloadnext-grid .downloadnext-card > .downloadnext-cover img{
    width:100% !important;
    max-width:350px !important;
    height:auto !important;
    object-fit:contain !important;
    object-position:center center !important;
}

.downloadnext-grid .downloadnext-card > .downloadnext-cover span{
    width:100% !important;
    min-height:210px !important;
    color:var(--downloadnext-accent-2);
}

.downloadnext-release-layout{
    width:100%;
    max-width:100%;
    min-width:0;
    grid-template-columns:minmax(240px,350px) minmax(0,1fr) !important;
}

.downloadnext-release-cover{
    width:100% !important;
    max-width:350px !important;
    border-radius:var(--downloadnext-radius) !important;
    border:1px solid var(--downloadnext-border) !important;
}

.downloadnext-release-cover img{
    width:100% !important;
    max-width:350px !important;
    height:auto !important;
    object-fit:contain !important;
}

/* Badges / Status */
.downloadnext-meta span,
.downloadnext-badge,
.downloadnext-status,
.downloadnext-community-chip{
    border-radius:999px !important;
    border:1px solid rgba(255,153,0,.30) !important;
    background:rgba(255,153,0,.10) !important;
    color:#ffd39a !important;
    font-weight:800;
}

.downloadnext-status-published{
    border-color:rgba(127,255,165,.38) !important;
    color:#9dffba !important;
    background:rgba(69,180,100,.12) !important;
}

.downloadnext-status-draft{
    border-color:rgba(255,210,122,.42) !important;
    color:#ffd27a !important;
    background:rgba(255,210,122,.10) !important;
}

.downloadnext-status-archived{
    border-color:rgba(255,154,154,.40) !important;
    color:#ffaaaa !important;
    background:rgba(255,90,90,.10) !important;
}

/* Admin-Listen / Tabellennahe Bereiche */
.downloadnext-admin-row,
.downloadnext-v6-list-row{
    min-width:0;
    border-color:rgba(255,255,255,.08) !important;
}

.downloadnext-admin-main,
.downloadnext-admin-actions,
.downloadnext-admin-badges{
    min-width:0;
}

.downloadnext-admin-actions{
    align-items:center;
}

/* Systemmeldungen */
.downloadnext-error,
.downloadnext-success,
.downloadnext-note,
.downloadnext-empty{
    border-radius:var(--downloadnext-radius-sm) !important;
    padding:13px 14px !important;
}

.downloadnext-error{
    border:1px solid rgba(255,100,100,.42) !important;
    background:rgba(80,20,20,.72) !important;
    color:#ffb1b1 !important;
}

.downloadnext-success{
    border:1px solid rgba(127,255,165,.36) !important;
    background:rgba(15,58,31,.70) !important;
    color:#9dffba !important;
}

.downloadnext-empty{
    border:1px dashed rgba(255,153,0,.30) !important;
    background:rgba(0,0,0,.22) !important;
    color:var(--downloadnext-muted) !important;
}

/* Widgets */
.downloadnext-widget{
    padding:14px !important;
}

.downloadnext-widget a{
    border-bottom:1px solid rgba(255,255,255,.08) !important;
    color:var(--downloadnext-text) !important;
}

.downloadnext-widget a:hover{
    color:var(--downloadnext-accent-2) !important;
}

/* Responsive */
@media (max-width:1100px){
    .downloadnext-filters{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:820px){
    .downloadnext-hero,
    .downloadnext-section-head,
    .downloadnext-community-summary{
        flex-direction:column;
        align-items:stretch;
    }

    .downloadnext-grid{
        grid-template-columns:1fr !important;
    }

    .downloadnext-card{
        max-width:100% !important;
    }

    .downloadnext-grid .downloadnext-card > .downloadnext-cover,
    .downloadnext-grid .downloadnext-card > .downloadnext-cover img,
    .downloadnext-release-cover,
    .downloadnext-release-cover img{
        width:100% !important;
        max-width:100% !important;
    }

    .downloadnext-release-layout{
        grid-template-columns:1fr !important;
    }

    .downloadnext-admin-row,
    .downloadnext-v6-list-row{
        grid-template-columns:1fr !important;
        flex-direction:column;
        align-items:stretch;
    }

    .downloadnext-admin-actions{
        justify-content:flex-start;
    }
}

@media (max-width:560px){
    .downloadnext-filters,
    .downloadnext-form-grid,
    .downloadnext-edit-form,
    .downloadnext-report-form,
    .downloadnext-review-form,
    .downloadnext-v6-form{
        grid-template-columns:1fr !important;
    }

    .downloadnext-module-nav a,
    .downloadnext-header-nav a,
    .downloadnext-nav-pill,
    .downloadnext-button,
    .downloadnext-card-actions .downloadnext-button,
    .downloadnext-inline-form,
    .downloadnext-inline-form button{
        width:100%;
    }
}
