/* AD-RP - home del forum rifatta (07/11/2026). Viene dopo adrp.css e tema.css; usa le loro variabili,
   quindi vale per il tema chiaro e per lo scuro. Plugin: inc/plugins/adrp_bello.php */

:root {
    --sole: #ff8a3d;
    --tramonto: linear-gradient(120deg, #ff8a3d, #ff5fa2 55%, #8b5cff);
    --riga-h: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

/* ---------------------------------------------------------------- testata: icone nei pulsanti */
#header ul.menu.top_links li a { gap: 7px; }
#header ul.menu.top_links li a::before {
    content: "";
    width: 15px;
    height: 15px;
    flex: none;
    background: currentColor;
    -webkit-mask: var(--mi, none) center / 15px no-repeat;
    mask: var(--mi, none) center / 15px no-repeat;
}
#header ul.menu.top_links li a:not([class]),
#header ul.menu.top_links li a.adrp-tema::before { --mi: none; }
#header ul.menu.top_links li a.adrp-tema::before { display: none; }
#header ul.menu.top_links a.portal { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.search { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-5-5'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.memberlist { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21a7 7 0 0 1 14 0'/%3E%3Cpath d='M16 4a4 4 0 0 1 0 8'/%3E%3Cpath d='M22 21a7 7 0 0 0-4-6.3'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.calendar { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.ucp { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='11' rx='5'/%3E%3Cpath d='M7 10.5v3.5M5.2 12.2h3.6'/%3E%3Ccircle cx='15.5' cy='11' r='.6'/%3E%3Ccircle cx='18' cy='13.5' r='.6'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.discord { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.3 5.3A17 17 0 0 0 15 4l-.5 1a15.6 15.6 0 0 0-5 0L9 4a17 17 0 0 0-4.3 1.3C2 9.4 1.3 13.4 1.6 17.3A17 17 0 0 0 6.8 20l1.1-1.7c-.6-.2-1.2-.5-1.7-.9l.4-.3a12 12 0 0 0 10.8 0l.4.3c-.5.4-1.1.7-1.7.9l1.1 1.7a17 17 0 0 0 5.2-2.7c.4-4.5-.7-8.5-3.1-12zM8.7 14.9c-1 0-1.9-1-1.9-2.1s.8-2.1 1.9-2.1 1.9 1 1.9 2.1-.8 2.1-1.9 2.1zm6.6 0c-1 0-1.9-1-1.9-2.1s.8-2.1 1.9-2.1 1.9 1 1.9 2.1-.8 2.1-1.9 2.1z'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.help { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14'/%3E%3Cpath d='M12 17.5h.01'/%3E%3C/svg%3E"); }
#header ul.menu.top_links a.discord:link, #header ul.menu.top_links a.discord:visited { background-color: rgba(88, 101, 242, .55) !important; border-color: rgba(160, 170, 255, .5); }

/* da collegati il menu ha un pulsante in piu': il logo non deve stringersi, e' il menu che va a capo */
@media (min-width: 761px) {
    #logo.adrp-hero .wrapper { grid-template-columns: minmax(330px, auto) minmax(0, 1fr); }
    .adrp-brand img { width: 330px; }
}

/* ricerca: campo con lente dentro */
#search { position: relative; }
#search input.textbox {
    padding-left: 38px !important;
    width: 280px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96ab' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 12px center !important;
    background-size: 16px !important;
}
#search input.textbox::placeholder { color: var(--muted); opacity: .85; }

/* nella home il titolo "American Dream Roleplay" sopra al benvenuto e' un doppione */
#content .wrapper:has(> .adrp-home) > .navigation { display: none; }
#content .wrapper:has(> .adrp-home) > br:first-of-type { display: none; }

/* ---------------------------------------------------------------- home a due colonne */
.adrp-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 24px;
    align-items: start;
    margin-top: 6px;
}
.adrp-principale { min-width: 0; }
.adrp-principale > br { display: none; }
.adrp-principale > .tborder { margin-bottom: 20px; }

/* benvenuto: piu' arioso, con il tramonto sotto */
.adrp-welcome {
    grid-template-columns: 1fr;
    padding: 28px 30px 26px 34px;
    background:
        radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, #ff5fa2 13%, transparent), transparent 55%),
        radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, #3d8bff 10%, transparent), transparent 60%),
        var(--surface);
}
.adrp-welcome::before { width: 4px; background: var(--tramonto); }
.adrp-welcome h2 { font-size: 27px; letter-spacing: -.02em; }
.adrp-welcome h2::before {
    content: "AMERICAN DREAM ROLEPLAY";
    display: block;
    margin-bottom: 6px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .22em;
    background: var(--tramonto);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.adrp-welcome-actions { justify-content: flex-start; }
.adrp-chips span { color: var(--muted); }

/* ---------------------------------------------------------------- categorie */
.adrp-cat { border-radius: 18px; }
.adrp-cat > thead .thead {
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, var(--surface)), var(--surface) 65%) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--c) 30%, var(--border)) !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}
.adrp-cat > thead .thead strong a { font-size: 17px; letter-spacing: .01em; }
/* la riga FORUM / DISCUSSIONI / POST non serve: i numeri hanno la loro etichetta */
.adrp-cat > tbody > tr:first-child:has(> td.tcat) { display: none; }

/* freccia per chiudere/aprire al posto dell'immagine di MyBB */
.thead .expcolimage { margin: 0 !important; opacity: 1 !important; float: right; }
.thead .expcolimage img.expander {
    width: 32px;
    height: 32px;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 10px;
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96ab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .25s, background-color .2s;
    margin-top: 4px;
}
.thead .expcolimage img.expander:hover { background-color: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.thead .expcolimage img.expander[src*="collapsed"] { transform: rotate(180deg); }
.thead.thead_collapsed { border-bottom: 0 !important; }

/* ---------------------------------------------------------------- righe delle sezioni */
.adrp-cat > tbody > tr > td { padding: 16px 14px !important; vertical-align: middle; }
.adrp-cat > tbody > tr > td:first-child { padding-left: 20px !important; }
.adrp-cat > tbody > tr > td:last-child { padding-right: 20px !important; }
.adrp-cat > tbody > tr:last-child > td { border-bottom: 0 !important; }
.adrp-cat > tbody > tr { transition: background-color .15s; }
.adrp-cat > tbody > tr:hover > td { background: var(--riga-h) !important; }
.adrp-cat td strong a[href*="forumdisplay"] { font-size: 17px; }
.adrp-cat td > .smalltext { margin-top: 2px; line-height: 1.45; }

/* numeri con la loro etichetta sotto */
td.adrp-num { width: 74px; padding-left: 6px !important; padding-right: 6px !important; }
td.adrp-num b { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; color: var(--text); }
td.adrp-num small { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ultimo messaggio: avatar + titolo + chi e quando */
td.adrp-ultimo { width: 230px; max-width: 230px; }
.adrp-lp { display: flex; align-items: center; gap: 11px; min-width: 0; text-align: left; }
.adrp-lp > div { min-width: 0; flex: 1; }
.adrp-lp a[href*="showthread"] {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 700;
    color: var(--text) !important;
}
.adrp-lp a[href*="showthread"]:hover { color: var(--link) !important; text-decoration: none; }
.adrp-lp > div > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); }
.adrp-lp > div > span a { font-weight: 700; }
.adrp-lp > div > span span, .adrp-ultime li > span span { display: inline !important; margin: 0 !important; }
.adrp-lp.vuoto { color: var(--muted); font-size: 13px; font-style: italic; justify-content: flex-start; }
img.adrp-av {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    object-fit: cover;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
img.adrp-av.def { opacity: .35; filter: grayscale(1); }
html[data-tema="scuro"] img.adrp-av.def { filter: grayscale(1) invert(1); opacity: .3; }

/* sottosezioni come etichette */
.adrp-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
a.adrp-subchip:link, a.adrp-subchip:visited {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    text-decoration: none;
}
a.adrp-subchip::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c, var(--accent)); }
a.adrp-subchip:hover { border-color: var(--accent); color: var(--link); }

/* ---------------------------------------------------------------- colonna laterale */
.adrp-lato { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
.adrp-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 18px;
}
.adrp-card-h {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -2px 0 14px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text);
}
.adrp-card-h span:not(.adrp-stato) { flex: 1; }
.ic { width: 18px; height: 18px; flex: none; background: var(--sole); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ic-srv { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='7' rx='2'/%3E%3Crect x='3' y='13' width='18' height='7' rx='2'/%3E%3Cpath d='M7 7.5h.01M7 16.5h.01'/%3E%3C/svg%3E"); }
.ic-ultime { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ic-dc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.3 5.3A17 17 0 0 0 15 4l-.5 1a15.6 15.6 0 0 0-5 0L9 4a17 17 0 0 0-4.3 1.3C2 9.4 1.3 13.4 1.6 17.3A17 17 0 0 0 6.8 20l1.1-1.7c-.6-.2-1.2-.5-1.7-.9l.4-.3a12 12 0 0 0 10.8 0l.4.3c-.5.4-1.1.7-1.7.9l1.1 1.7a17 17 0 0 0 5.2-2.7c.4-4.5-.7-8.5-3.1-12zM8.7 14.9c-1 0-1.9-1-1.9-2.1s.8-2.1 1.9-2.1 1.9 1 1.9 2.1-.8 2.1-1.9 2.1zm6.6 0c-1 0-1.9-1-1.9-2.1s.8-2.1 1.9-2.1 1.9 1 1.9 2.1-.8 2.1-1.9 2.1z'/%3E%3C/svg%3E"); }

/* server */
.adrp-srv { position: relative; overflow: hidden; }
.adrp-srv::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tramonto); }
.adrp-stato {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.adrp-stato::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8a96ab; }
.adrp-stato.on { color: #1f9d61; border-color: color-mix(in srgb, #1f9d61 35%, var(--border)); background: color-mix(in srgb, #1f9d61 10%, var(--surface)); }
.adrp-stato.on::before { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: adrp-pulsa 2s infinite; }
@keyframes adrp-pulsa { 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.adrp-ip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px dashed color-mix(in srgb, var(--sole) 45%, var(--border));
}
.adrp-ip code { flex: 1; font: 700 15px/1.2 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--text); background: none; letter-spacing: .02em; }
.adrp-lato button.adrp-copia {
    padding: 6px 12px !important;
    font-size: 12.5px !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}
.adrp-lato button.adrp-copia.ok { background: #1f9d61 !important; color: #fff !important; border-color: transparent !important; }
.adrp-dati { list-style: none; margin: 14px 0 16px; padding: 0; }
.adrp-dati li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.adrp-dati li:last-child { border-bottom: 0; }
.adrp-dati span { color: var(--muted); }
.adrp-dati b { color: var(--text); font-weight: 700; text-align: right; }
.adrp-srv .adrp-btn:link, .adrp-srv .adrp-btn:visited { display: flex; justify-content: center; width: 100%; box-sizing: border-box; min-height: 42px; margin-top: 8px; font-size: 14.5px; }
.adrp-srv .adrp-btn.primary:link, .adrp-srv .adrp-btn.primary:visited { background: var(--tramonto); box-shadow: 0 8px 22px rgba(255, 95, 162, .3); }

/* ultime discussioni */
.adrp-ultime ul { list-style: none; margin: 0; padding: 0; }
.adrp-ultime li { padding: 10px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.adrp-ultime li:first-child { padding-top: 0; }
.adrp-ultime li:last-child { border-bottom: 0; padding-bottom: 0; }
.adrp-ultime li a { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14.5px; font-weight: 700; color: var(--text) !important; }
.adrp-ultime li a:hover { color: var(--link) !important; text-decoration: none; }
.adrp-ultime li > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.adrp-ultime li.vuoto { color: var(--muted); font-size: 14px; }

/* discord */
a.adrp-dc:link, a.adrp-dc:visited {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    border: 0;
    background: linear-gradient(135deg, #5865f2, #4752c4);
    box-shadow: 0 10px 26px rgba(88, 101, 242, .35);
    transition: transform .2s, box-shadow .2s;
}
a.adrp-dc:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(88, 101, 242, .45); }
a.adrp-dc .ic { width: 34px; height: 34px; background: #fff; }
a.adrp-dc b { display: block; font-size: 16px; }
a.adrp-dc small { display: block; font-size: 13px; opacity: .85; line-height: 1.35; }

/* ---------------------------------------------------------------- legenda e piede */
.forum_legend { opacity: .75; }
#footer .upper { background: var(--surface); }
#footer .lower .wrapper { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-size: 13px; }

/* ---------------------------------------------------------------- schermi stretti */
@media (max-width: 1060px) {
    .adrp-home { grid-template-columns: minmax(0, 1fr); }
    .adrp-lato { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    td.adrp-ultimo { width: 200px; max-width: 200px; }
}
/* telefono: server e ultime discussioni subito dopo il benvenuto, non in fondo alla pagina */
@media (max-width: 760px) {
    .adrp-home { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
    .adrp-principale { display: contents; }
    .adrp-principale > .adrp-welcome { order: 1; margin: 0; }
    .adrp-lato { order: 2; display: flex; flex-direction: column; gap: 14px; }
    .adrp-principale > table, .adrp-principale > .tborder { order: 3; margin-bottom: 4px; }
    .adrp-card { padding: 16px; border-radius: 16px; }
    .adrp-card-h { margin-bottom: 12px; font-size: 12px; letter-spacing: .1em; }
    .adrp-ip { padding: 5px 5px 5px 12px; }
    .adrp-ip code { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .adrp-dati { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
    .adrp-dati li { padding: 4px 10px; border: 1px solid var(--border) !important; border-radius: 999px; font-size: 12.5px; background: var(--surface-2); }
    .adrp-dati li span { display: none; }
    .adrp-srv .adrp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .adrp-srv .adrp-btn:link, .adrp-srv .adrp-btn:visited { min-height: 42px; margin-top: 8px; font-size: 13.5px; padding: 0 10px; white-space: normal; text-align: center; line-height: 1.2; }
    .adrp-ultime li:nth-child(n+5) { display: none; }
    .adrp-ultime li a { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    a.adrp-dc:link, a.adrp-dc:visited { padding: 14px 16px; }
    .forum_legend { clear: both; margin-top: 10px; }
    .adrp-welcome { padding: 22px 20px; }
    .adrp-welcome h2 { font-size: 22px; }
    .adrp-cat > tbody > tr > td:first-child { padding-left: 14px !important; }
    .thead .expcolimage img.expander { width: 30px; height: 30px; padding: 15px; }
    #search input.textbox { width: auto; }
}
