
/* PVPGRAM.COM V5 / layout hardening and visual refresh */
:root{--v5-line:#e4d7f0;--v5-text:#311a48}
html,body{max-width:100%;overflow-x:clip}
.main-content,.wrap,.panel,.panel-body,.columns,.primary,.aside{min-width:0}
.panel .panel-head h2,.server-title,.topic-title,.sidebar-server strong{overflow-wrap:anywhere;word-break:normal}
/* Advertisements: actual aspect ratios 728x90 and 300x250 (scaled only on narrow viewports). */
a.ad-banner.ad-slot-wide{width:min(100%,728px);max-width:728px;min-height:0;height:auto;aspect-ratio:728/90;margin-inline:auto;box-sizing:border-box;display:flex;align-items:center;justify-content:center}
a.ad-banner.ad-slot-sidebar{width:min(100%,300px);max-width:300px;min-height:0;height:auto;aspect-ratio:300/250;margin-inline:auto;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0 10px}
a.ad-banner.ad-real{padding:0}
a.ad-banner.ad-real img{width:100%;height:100%;max-height:none;object-fit:fill;display:block}
a.ad-banner.ad-empty>span{min-width:0;text-align:center;font-size:clamp(11px,1.4vw,14px)}
a.ad-banner.ad-empty>span small{overflow-wrap:anywhere;font-size:clamp(9px,1.1vw,11px)}
/* Listing rows: previously six min-content columns squeezed text and action buttons. */
.server-row.full-row{display:grid!important;grid-template-columns:28px 102px minmax(0,1fr) 100px 126px!important;grid-template-rows:auto auto;align-items:center;column-gap:12px!important;row-gap:6px;min-height:104px;padding:14px!important}
.server-row.full-row .rank-bubble{grid-column:1;grid-row:1/3}
.server-row.full-row .thumb{grid-column:2;grid-row:1/3;width:102px;height:69px}
.server-row.full-row .server-game{grid-column:3;grid-row:1;display:flex;align-items:center;min-width:0}
.server-row.full-row .server-row-content{grid-column:3;grid-row:2;min-width:0;align-self:start}
.server-row.full-row .server-title{font-size:14px;font-weight:850;line-height:1.45;-webkit-line-clamp:2}
.server-row.full-row .server-summary{font-size:11px;line-height:1.5;margin-top:4px;white-space:normal}
.server-row.full-row .server-metrics{grid-column:4;grid-row:1/3;display:flex;flex-direction:column;align-items:flex-start;gap:8px;font-size:12px;line-height:1.3}
.server-row.full-row .server-actions{grid-column:5;grid-row:1/3;display:flex;flex-direction:column;align-items:stretch;gap:8px}
.server-row.full-row .server-actions a,.server-row.full-row .server-actions button{justify-content:center;min-height:32px;width:100%;font-size:11px}
.server-row .server-row-content{min-width:0}
.server-row .server-title{overflow-wrap:anywhere}
.server-row .tag-line{min-width:0;max-width:100%;overflow:hidden;flex-wrap:wrap;gap:4px}
.server-row:not(.full-row){min-height:90px;padding:12px!important;align-items:center;gap:10px}
/* Compact game icons, fixed aspect and no heading collision. */
.v5-game-tag{display:inline-flex!important;align-items:center;gap:5px;max-width:100%;min-width:0;vertical-align:middle;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.v5-game-tag img{width:21px!important;height:21px!important;max-width:21px;min-width:21px;flex:none;object-fit:cover;border-radius:5px;box-shadow:0 1px 3px #45246320;display:block}
.topic-row .topic-entry-head{gap:7px 12px;display:flex;flex-wrap:wrap;align-items:center}
.topic-row .topic-title{flex:1 1 175px;min-width:0;max-width:100%}
/* Info lines with icon and label must reserve a reliable value column. */
.info-line-v4,.sv-info-line,.server-info-row,.server-info-item{min-width:0;overflow-wrap:anywhere}
.info-line-v4{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(80px,42%)!important;gap:12px!important;align-items:center!important;min-height:49px}
.info-line-v4>*{min-width:0}
.info-line-v4>:last-child{text-align:right!important;overflow-wrap:anywhere;word-break:normal;white-space:normal!important}
.info-line-v4 .i{flex:0 0 18px;display:inline-block}
/* Authentication: full branded page instead of isolated card on a blank background. */
.auth-v5-scene{margin:25px auto 40px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(325px,.85fr);max-width:1020px;min-height:510px;overflow:hidden;border:1px solid #d9c7e9;border-radius:22px;background:#fff;box-shadow:0 22px 55px #2f174925}
.auth-v5-info{padding:64px 45px;background:linear-gradient(115deg,#32134f,#5b2386 57%,#8836b5);color:#fff;position:relative;display:flex;flex-direction:column;justify-content:center}
.auth-v5-info:after{content:"";position:absolute;inset:0;background:url('../img/footer-mountains.svg') center bottom/cover no-repeat;opacity:.24;pointer-events:none}
.auth-v5-overline,.auth-v5-info h2,.auth-v5-info p,.auth-v5-perks{position:relative;z-index:1}
.auth-v5-overline{display:inline-flex;align-items:center;gap:8px;color:#ffdb66;letter-spacing:2px;font-weight:800;font-size:12px}
.auth-v5-info h2{font-size:clamp(24px,3vw,37px);line-height:1.16;margin:15px 0}
.auth-v5-info p{line-height:1.8;font-size:14px;color:#ebd9f7}
.auth-v5-perks{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.auth-v5-perks span{display:inline-flex;gap:6px;align-items:center;border:1px solid #ffffff40;background:#ffffff14;padding:9px 11px;border-radius:10px;font-size:11px;font-weight:800}
.auth-v5-card{border:none!important;box-shadow:none!important;padding:38px clamp(22px,4vw,52px)!important;display:flex;flex-direction:column;justify-content:center;max-width:none!important;width:100%!important;margin:0!important}
.auth-v5-card label{display:block;font-size:12px;font-weight:800;margin:12px 0;color:var(--v5-text)}
.auth-v5-card input{display:block;width:100%;height:45px;border:1px solid #d1bde4;border-radius:9px;margin-top:7px;padding:10px 12px}
.auth-v5-card h1{text-align:center;font-size:25px;margin:8px 0;color:#50207c}
.auth-v5-card>p{text-align:center;margin:0 0 15px;color:#756580;font-size:12px}
.auth-v5-card form>.btn{width:100%;justify-content:center;display:flex;align-items:center;margin-top:15px;min-height:44px}
.auth-v5-card .auth-switch{text-align:center;margin:17px 0 0}
.auth-v5-card .auth-forgot{text-align:center;font-size:12px;margin:9px auto 0}
.auth-v5-card .auth-logo-v4{margin:0 auto 9px}
/* Ad-purchase guide and editor. */
.v5-ad-guide{padding:16px;border-radius:15px;background:#f8f3ff;border:1px solid #d8c7f1;margin:15px 0}
.v5-ad-guide h3{font-size:15px;display:flex;align-items:center;gap:8px;color:#532581;margin:0 0 14px}
.v5-ad-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.v5-ad-guide-grid>div{display:flex;flex-direction:column;gap:5px;background:#fff;border:1px solid #e3d5f0;border-radius:11px;padding:14px;min-width:0}
.v5-ad-guide-grid strong{font-size:22px;color:#562087}
.v5-ad-guide-grid small{font-size:12px;color:#654978}
.v5-ad-guide-grid span{font-size:11px;color:#756281}
.v5-ad-guide-grid b{font-size:12px;color:#532184}
.v5-ad-proportion{border:2px dashed #b989e0;background:#f1e9fb;min-height:0;align-self:flex-start;max-width:100%;border-radius:6px;margin:9px 0 0}
.v5-ad-proportion.wide{width:100%;aspect-ratio:728/90}
.v5-ad-proportion.side{width:min(100%,100px);aspect-ratio:300/250}
.v5-ad-size-hint{font-size:12px;color:#6a3397;border:1px dashed #c9adf0;background:#f8f2ff;padding:10px;border-radius:9px;align-self:center}
.v5-ad-privacy{font-size:11px;color:#746280;margin:14px 0 0;line-height:1.5}
.rich-wrapper{max-width:100%;overflow:hidden}
.rich-content{min-width:0;overflow-wrap:anywhere}
.rich-content img,.prose img{width:auto;max-width:100%;height:auto;object-fit:contain}
/* Admin uploaded badges and game-category images */
.v5-category-admin{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;padding:13px}
.v5-category-admin-item{border:1px solid #e0d2ed;border-radius:12px;padding:12px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:7px;background:#fbf9ff}
.v5-category-admin-item img{width:72px;height:50px;object-fit:contain;border-radius:8px;background:#f2e9fc}
.v5-category-admin-item strong{font-size:13px;color:#45206a}
.v5-category-admin-item input[type=file]{font-size:11px;max-width:100%}
.v5-category-admin-item label{font-size:11px}
.v5-games-upgrade{padding:12px}
.v5-badge-admin{min-width:0;max-width:100%;overflow:hidden}
.v5-badge-edit{display:flex;flex-direction:column;gap:5px;min-width:0}
.v5-badge-edit label{font-size:10px;max-width:100%}
.v5-badge-edit input{width:100%;min-width:0;max-width:100%;margin-top:3px;padding:6px;font-size:11px}
@media(max-width:1120px){
 .server-row.full-row{grid-template-columns:26px 90px minmax(0,1fr) 80px 98px!important;column-gap:8px!important}
 .server-row.full-row .thumb{width:90px;height:64px}
 .server-row.full-row .server-title{font-size:12px}
 .server-row.full-row .server-actions a,.server-row.full-row .server-actions button{font-size:10px;padding:6px 5px}
}
@media(max-width:850px){
 .auth-v5-scene{max-width:620px;grid-template-columns:1fr}
 .auth-v5-info{padding:27px 24px;min-height:180px}
 .auth-v5-info h2{font-size:25px}
 .auth-v5-card{padding:30px 26px!important}
 .server-row.full-row{grid-template-columns:24px 80px minmax(0,1fr) 84px!important;grid-template-rows:auto auto auto;min-height:120px}
 .server-row.full-row .thumb{grid-column:2;grid-row:1/4;width:80px;height:62px}
 .server-row.full-row .rank-bubble{grid-row:1/4}
 .server-row.full-row .server-game{grid-column:3;grid-row:1}
 .server-row.full-row .server-row-content{grid-column:3;grid-row:2/4}
 .server-row.full-row .server-metrics{grid-column:4;grid-row:1/3}
 .server-row.full-row .server-actions{grid-column:4;grid-row:3;flex-direction:row;flex-wrap:wrap}
 .server-row.full-row .server-actions>*{flex:1 1 auto;min-width:0}
}
@media(max-width:600px){
 .auth-v5-scene{margin:12px auto 20px}
 .auth-v5-info{padding:22px 18px}
 .auth-v5-info p{font-size:12px}
 .auth-v5-perks span{font-size:10px}
 .auth-v5-card{padding:22px 18px!important}
 .v5-ad-guide-grid{grid-template-columns:1fr}
 .server-row.full-row{grid-template-columns:24px 66px minmax(0,1fr)!important;grid-template-rows:auto auto auto auto;gap:7px!important;padding:11px!important}
 .server-row.full-row .thumb{grid-column:2;grid-row:1/3;width:66px;height:57px}
 .server-row.full-row .rank-bubble{grid-row:1/3}
 .server-row.full-row .server-game{grid-column:3;grid-row:1}
 .server-row.full-row .server-row-content{grid-column:3;grid-row:2;min-width:0}
 .server-row.full-row .server-metrics{grid-column:2/4;grid-row:3;display:flex;flex-direction:row;flex-wrap:wrap;gap:10px}
 .server-row.full-row .server-actions{grid-column:2/4;grid-row:4;display:flex;flex-direction:row;justify-content:flex-start}
 .server-row.full-row .server-actions>a,.server-row.full-row .server-actions>form{max-width:125px}
 .server-row.full-row .server-actions button{width:100%}
 .server-row.full-row .server-summary{font-size:10px;line-height:1.4}
 .server-row.full-row .server-title{font-size:12px}
 .server-row.full-row .v5-game-tag img{width:18px!important;height:18px!important;max-width:18px;min-width:18px}
 .info-line-v4{grid-template-columns:minmax(0,1fr) minmax(80px,38%)!important;gap:7px!important}
}

.v5-limit-counter{display:block;color:#846798;text-align:right;margin:3px 3px 0;font-size:11px}.v5-limit-counter.over{color:#c02c47;font-weight:900}
