/* Deadly Fear Staff Mode modernization layer
   Scoped to .df-legacy-page so player-facing pages and newer staff pages stay untouched. */

.df-legacy-page,
.df-legacy-page * { box-sizing: border-box; }

.df-legacy-page {
    --sm-bg: #090b10;
    --sm-panel: #10141b;
    --sm-panel-2: #151a23;
    --sm-line: #282f3b;
    --sm-line-soft: #1d232d;
    --sm-text: #f2f4f7;
    --sm-muted: #8d97a7;
    --sm-red: #e11d3f;
    --sm-red-soft: rgba(225,29,63,.14);
    --sm-gold: #f3b33f;
    --sm-green: #61da83;
    --sm-blue: #6ab6ff;
    --sm-purple: #ba8cff;
    position: relative;
    min-width: 0;
    padding: 24px !important;
    color: var(--sm-text) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    background:
        radial-gradient(circle at 92% -50px, rgba(225,29,63,.10), transparent 280px),
        radial-gradient(circle at 10% 8%, rgba(106,182,255,.035), transparent 260px),
        #090b10 !important;
}

.df-legacy-page::before {
    content: "STAFF MODE";
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    padding: 5px 9px;
    border: 1px solid #4b1d29;
    border-radius: 999px;
    background: #180d12;
    color: #ff7189;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.df-legacy-page > div:first-child {
    width: 100% !important;
    max-width: none !important;
    text-align: left !important;
}

/* Old hero blocks */
.df-legacy-page > div:first-child > div:first-child,
.df-legacy-page > div[style*="border-bottom"]:first-child {
    position: relative !important;
    overflow: hidden !important;
    margin: 0 0 20px !important;
    padding: 22px 24px !important;
    border: 1px solid #2c333f !important;
    border-radius: 16px !important;
    background:
        linear-gradient(135deg, rgba(225,29,63,.12), transparent 48%),
        linear-gradient(180deg, #151922, #0e1117) !important;
    box-shadow: 0 16px 36px rgba(0,0,0,.24) !important;
}

.df-legacy-page > div:first-child > div:first-child::after,
.df-legacy-page > div[style*="border-bottom"]:first-child::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -58px;
    top: -72px;
    border-radius: 50%;
    background: rgba(225,29,63,.10);
    pointer-events: none;
}

.df-legacy-page h1 {
    margin: 0 0 7px !important;
    color: #fff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: clamp(22px, 3vw, 31px) !important;
    line-height: 1.08 !important;
    letter-spacing: -.45px !important;
    text-transform: none !important;
    font-weight: 900 !important;
}

.df-legacy-page h1 span { color: #ff526d !important; }

.df-legacy-page h2,
.df-legacy-page h3 {
    color: #f7f8fa !important;
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.df-legacy-page h2 {
    margin: 0 0 14px !important;
    font-size: 17px !important;
    font-weight: 850 !important;
}

.df-legacy-page h3 {
    margin: 0 0 12px !important;
    font-size: 15px !important;
    font-weight: 850 !important;
}

.df-legacy-page p,
.df-legacy-page > p,
.df-legacy-page h1 + p,
.df-legacy-page > div:first-child > div:first-child p {
    color: var(--sm-muted) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
    letter-spacing: .05px !important;
    text-transform: none !important;
}

/* Cards / panels */
.df-legacy-page .mcc-panel-card,
.df-legacy-page .panel {
    position: relative !important;
    margin: 0 0 16px !important;
    padding: 20px !important;
    border: 1px solid var(--sm-line) !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #12161e, #0e1117) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.20) !important;
}

.df-legacy-page .mcc-panel-card:hover,
.df-legacy-page .panel:hover {
    border-color: #343d4a !important;
}

/* Turn old floating terminal captions into clean chips. */
.df-legacy-page .mcc-panel-card > span[style*="position: absolute"],
.df-legacy-page .panel > span[style*="position: absolute"] {
    position: static !important;
    display: inline-flex !important;
    width: auto !important;
    margin: 0 0 11px !important;
    padding: 4px 8px !important;
    border: 1px solid #41303a !important;
    border-radius: 999px !important;
    background: #151117 !important;
    color: #e7a4b0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .8px !important;
    text-transform: uppercase !important;
}

/* Forms */
.df-legacy-page form {
    font-family: Arial, Helvetica, sans-serif !important;
}

.df-legacy-page label {
    display: block !important;
    margin: 0 0 6px !important;
    color: #8c96a6 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9px !important;
    font-weight: 850 !important;
    letter-spacing: .8px !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
}

.df-legacy-page input[type="text"],
.df-legacy-page input[type="email"],
.df-legacy-page input[type="password"],
.df-legacy-page input[type="number"],
.df-legacy-page input[type="url"],
.df-legacy-page select,
.df-legacy-page textarea {
    width: 100% !important;
    min-height: 40px !important;
    padding: 10px 11px !important;
    border: 1px solid #303846 !important;
    border-radius: 9px !important;
    outline: none !important;
    background: #0a0d12 !important;
    color: #f2f4f7 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    box-shadow: inset 0 1px rgba(255,255,255,.018) !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.df-legacy-page textarea {
    min-height: 110px !important;
    resize: vertical !important;
}

.df-legacy-page input:focus,
.df-legacy-page select:focus,
.df-legacy-page textarea:focus {
    border-color: #8e3045 !important;
    background: #0c1016 !important;
    box-shadow: 0 0 0 3px rgba(225,29,63,.10) !important;
}

.df-legacy-page input[type="checkbox"],
.df-legacy-page input[type="radio"] {
    accent-color: var(--sm-red);
}

.df-legacy-page button,
.df-legacy-page input[type="submit"],
.df-legacy-page input[type="button"] {
    min-height: 38px !important;
    padding: 9px 15px !important;
    border: 1px solid #7b2337 !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, #d92142, #a7112c) !important;
    color: #fff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: .35px !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    box-shadow: 0 8px 18px rgba(177,17,45,.15) !important;
    transition: transform .12s ease, filter .12s ease, border-color .12s ease;
}

.df-legacy-page button:hover,
.df-legacy-page input[type="submit"]:hover,
.df-legacy-page input[type="button"]:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.df-legacy-page a button { pointer-events: none; }

/* Links */
.df-legacy-page a {
    color: #ff667e !important;
    font-family: Arial, Helvetica, sans-serif !important;
    text-decoration: none !important;
}
.df-legacy-page a:hover { color: #fff !important; }

/* Alerts */
.df-legacy-page .alert {
    display: block !important;
    margin: 0 0 16px !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
.df-legacy-page .alert.success {
    border: 1px solid #235337 !important;
    background: #102419 !important;
    color: #77e698 !important;
}
.df-legacy-page .alert.error {
    border: 1px solid #662133 !important;
    background: #291018 !important;
    color: #ff758b !important;
}

/* Tables */
.df-legacy-page table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--sm-line) !important;
    border-radius: 11px !important;
    background: #0d1016 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
}
.df-legacy-page th {
    padding: 10px 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #303744 !important;
    background: #171c25 !important;
    color: #939dad !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .7px !important;
    text-align: left !important;
    text-transform: uppercase !important;
}
.df-legacy-page td {
    padding: 10px 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #1e242d !important;
    color: #d8dde5 !important;
    vertical-align: middle !important;
}
.df-legacy-page tr:last-child td { border-bottom: 0 !important; }
.df-legacy-page tbody tr:hover td { background: rgba(255,255,255,.018) !important; }

/* Old admin grid/card layouts */
.df-legacy-page .grid,
.df-legacy-page > div[style*="grid-template-columns"],
.df-legacy-page > div:first-child > div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)) !important;
    gap: 16px !important;
    margin-top: 16px !important;
}

/* Inner list/editor rows */
.df-legacy-page .panel > div[style*="background"],
.df-legacy-page .mcc-panel-card > div[style*="background"] {
    border-color: #252c36 !important;
    border-radius: 10px !important;
    background: #0b0e13 !important;
}

.df-legacy-page hr {
    height: 1px !important;
    margin: 14px 0 !important;
    border: 0 !important;
    background: #262d37 !important;
}

.df-legacy-page small { color: #7e8999 !important; }

/* Scrollable admin list panes */
.df-legacy-page [style*="overflow-y:auto"],
.df-legacy-page [style*="overflow-y: auto"] {
    scrollbar-width: thin;
    scrollbar-color: #3a4351 #0a0d11;
}

/* Footer/back links become a small staff toolbar */
.df-legacy-page > p:last-child,
.df-legacy-page > div:first-child > p:last-child {
    margin-top: 18px !important;
    padding-top: 14px !important;
    border-top: 1px solid #222936 !important;
}

@media (max-width: 900px) {
    .df-legacy-page { padding: 18px !important; }
    .df-legacy-page > div:first-child > div:first-child,
    .df-legacy-page > div[style*="border-bottom"]:first-child { padding: 18px !important; }
}

@media (max-width: 640px) {
    .df-legacy-page { padding: 13px !important; }
    .df-legacy-page::before { margin-bottom: 8px; }
    .df-legacy-page h1 { font-size: 22px !important; }
    .df-legacy-page .mcc-panel-card,
    .df-legacy-page .panel { padding: 14px !important; border-radius: 12px !important; }
    .df-legacy-page form [style*="display:flex"],
    .df-legacy-page form [style*="display: flex"],
    .df-legacy-page .panel [style*="display:flex"],
    .df-legacy-page .mcc-panel-card [style*="display:flex"] {
        flex-wrap: wrap !important;
    }
    .df-legacy-page form [style*="width:110px"],
    .df-legacy-page form [style*="width:120px"],
    .df-legacy-page form [style*="width:90px"],
    .df-legacy-page form [style*="width:80px"],
    .df-legacy-page form [style*="width:60px"],
    .df-legacy-page form [style*="width:50px"] {
        width: 100% !important;
    }
    .df-legacy-page table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    .df-legacy-page button,
    .df-legacy-page input[type="submit"] { max-width: 100%; }
}
