*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

html,body{
    background:#0b0b0b;
    color:#ccc;
    font-family:'Segoe UI',Arial,sans-serif;
    font-size:14px;
    min-height:100vh;
    overflow-x:hidden;
}

body.pvp-embedded .navbar,
body.pvp-embedded .site-footer,
body.pvp-embedded .generator-tabs{
    display:none!important;
}

body.pvp-embedded .left-col,
body.pvp-embedded .right-col{
    display:none!important;
}

body.pvp-embedded .game-layout{
    display:flex!important;
    justify-content:center!important;
}

body.pvp-embedded .center-col{
    width:100%!important;
    max-width:900px!important;
}

body.pvp-embedded .generator-page{
    height:100vh!important;
    min-height:100vh!important;
}

body.pvp-embedded .game-page{
    padding:6px!important;
}

body.pvp-embedded .restart-btn{
    display:none!important;
}

/* PROFILE / ACHIEVEMENTS */
.site-footer{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:10px;
    padding:24px 12px 28px;
    color:#666;
    font-size:12px;
    letter-spacing:1px;
}

.site-footer-title{
    color:#aaa;
    font-size:13px;
    font-weight:800;
    letter-spacing:1.5px;
    text-transform:uppercase;
}

.site-footer-links{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
}

.site-footer a{
    color:#9a9a9a;
    width:44px;
    height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #242424;
    border-radius:8px;
    background:#101010;
    transition:color .16s,border-color .16s,background .16s;
}

.site-footer a:hover{
    color:#e05050;
    border-color:#5a1a1a;
    background:#170808;
    text-decoration:none;
}

.site-footer svg{
    width:24px;
    height:24px;
    fill:currentColor;
}

.site-footer .donation-link{
    width:auto;
    min-width:190px;
    gap:9px;
    padding:0 14px;
    color:#f0b0b0;
}

.site-footer .donation-link span{
    font-size:12px;
    font-weight:800;
    letter-spacing:.8px;
    white-space:nowrap;
}

.site-footer .donation-link svg{
    color:#e05050;
    flex:0 0 auto;
}

.nav-brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.online-badge{
    min-height:24px;
    display:flex;
    align-items:center;
    gap:6px;
    border:1px solid #1f3a24;
    border-radius:999px;
    background:#081109;
    color:#8fd89a;
    padding:0 9px;
    font-size:10px;
    font-weight:800;
    letter-spacing:.7px;
    white-space:nowrap;
    font-family:inherit;
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
}

.online-badge:hover,
.online-badge:focus-visible{
    border-color:#2f7139;
    color:#b8ffc0;
    outline:none;
}

.online-badge.is-visits{
    background:#f4f4f4;
    border-color:#fff;
    color:#101010;
    box-shadow:0 0 18px rgba(255,255,255,.12);
}

.online-badge.is-visits:hover,
.online-badge.is-visits:focus-visible{
    background:#fff;
    color:#000;
    border-color:#fff;
}

.online-badge.is-visits .online-dot{
    background:#101010;
    box-shadow:none;
}

.online-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:#4dff75;
    box-shadow:0 0 10px rgba(77,255,117,.85);
    flex:0 0 auto;
}

.sound-control{
    position:fixed;
    right:12px;
    bottom:12px;
    z-index:5200;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:6px;
}

.sound-float-btn{
    min-width:58px;
    height:31px;
    padding:0 9px;
    border:1px solid #3b2727;
    border-radius:999px;
    background:rgba(10,10,10,.92);
    color:#f0f0f0;
    box-shadow:0 10px 30px rgba(0,0,0,.3);
    font-family:inherit;
    font-size:10px;
    font-weight:900;
    letter-spacing:.8px;
    cursor:pointer;
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.sound-float-btn:hover,
.sound-float-btn:focus-visible{
    color:#fff;
    border-color:#e05050;
    outline:none;
}

.sound-float-btn.is-muted{
    color:#e05050;
    border-color:#5a1a1a;
}

.sound-float-panel{
    width:188px;
    padding:10px;
    border:1px solid #2a1a1a;
    border-radius:8px;
    background:rgba(12,12,12,.96);
    box-shadow:0 18px 48px rgba(0,0,0,.42);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}

.sound-float-panel[hidden]{
    display:none!important;
}

.sound-panel-head,
.profile-sound-settings > div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    color:#fff;
    font-size:10px;
    font-weight:900;
    letter-spacing:1px;
    margin-bottom:6px;
}

.sound-panel-head b,
.profile-sound-settings strong{
    color:#e05050;
    font-size:11px;
}

.sound-float-panel input[type="range"],
.profile-sound-settings input[type="range"]{
    width:100%;
    accent-color:#e05050;
}

.sound-float-panel label,
.profile-sound-settings label{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:6px;
    color:#aaa;
    font-size:11px;
    font-weight:800;
}

.profile-page{
    width:min(1120px,calc(100% - 28px));
    margin:26px auto 10px;
}

.profile-actions{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:12px;
}

.profile-actions a,
.profile-back-btn{
    min-height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid #2a1616;
    border-radius:7px;
    background:#101010;
    color:#aaa;
    padding:0 12px;
    font-size:10px;
    letter-spacing:1px;
    cursor:pointer;
    font-weight:700;
}

.profile-actions a:hover,
.profile-back-btn:hover{
    color:#fff;
    border-color:#5a1a1a;
    background:#170808;
    text-decoration:none;
}

.vip-name-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin-left:8px;
    padding:4px 8px;
    border-radius:999px;
    background:linear-gradient(135deg,#ffe28a,#a97812);
    color:#111;
    font-size:11px;
    vertical-align:middle;
}

.profile-title-block h1.is-vip-name{
    color:#f8db7a;
    text-shadow:0 0 18px rgba(248,219,122,.24);
}

.profile-title-block h1.is-vip-name .vip-name-badge{
    color:#111;
    text-shadow:none;
}

.profile-vip-row{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin:0 0 10px;
}

.profile-vip-btn{
    min-height:28px;
    display:inline-flex;
    align-items:center;
    border:1px solid #8a671b;
    border-radius:7px;
    padding:0 10px;
    background:#171107;
    color:#f8db7a;
    font-size:10px;
    font-weight:800;
    letter-spacing:1px;
}

.profile-vip-btn:hover{
    background:#f8db7a;
    color:#111;
    text-decoration:none;
}

.profile-hide-toggle{
    display:flex;
    align-items:center;
    gap:6px;
    color:#aaa;
    font-size:12px;
}

.profile-hide-toggle input{
    accent-color:#d8b35a;
}

.vip-page{
    width:min(1040px,calc(100% - 28px));
    margin:28px auto 40px;
    color:#fff;
}

.vip-hero{
    display:flex;
    align-items:center;
    gap:18px;
    padding:24px;
    border:1px solid #6f5317;
    border-radius:8px;
    background:
        linear-gradient(135deg,rgba(248,219,122,.16),rgba(169,120,18,.08)),
        #0f0f0f;
    box-shadow:0 0 34px rgba(248,219,122,.08);
}

.vip-crown{
    width:76px;
    height:76px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:linear-gradient(135deg,#ffe28a,#a97812);
    color:#111;
    font-size:42px;
    font-weight:900;
    box-shadow:0 0 24px rgba(248,219,122,.24);
}

.vip-kicker{
    color:#f8db7a;
    font-size:12px;
    font-weight:900;
    letter-spacing:3px;
    text-transform:uppercase;
}

.vip-hero h1{
    margin:4px 0;
    font-size:44px;
    line-height:1;
    letter-spacing:0;
}

.vip-hero p{
    margin:0;
    color:#d7d7d7;
    font-weight:800;
}

.vip-benefits,
.vip-buy-box{
    margin-top:14px;
    padding:20px;
    border:1px solid #242424;
    border-radius:8px;
    background:#101010;
}

.vip-benefits h2{
    margin:0 0 14px;
    font-size:22px;
}

.vip-benefit-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}

.vip-benefit-list div{
    min-height:54px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px;
    border:1px solid #2a2414;
    border-radius:8px;
    background:#0b0b0b;
    color:#dcdcdc;
    font-size:14px;
    line-height:1.3;
}

.vip-benefit-list span{
    width:30px;
    height:30px;
    flex:0 0 30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:7px;
    background:#171107;
    color:#f8db7a;
    font-weight:900;
}

.vip-buy-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border-color:#6f5317;
}

.vip-buy-box strong,
.vip-buy-box span{
    display:block;
}

.vip-buy-box strong{
    color:#fff;
    font-size:18px;
}

.vip-buy-box span{
    color:#aaa;
    margin-top:4px;
}

.vip-buy-box button{
    min-height:44px;
    padding:0 18px;
    border:1px solid #ffe28a;
    border-radius:8px;
    background:linear-gradient(135deg,#ffe28a,#a97812);
    color:#111;
    font-weight:900;
    letter-spacing:1px;
    opacity:.72;
}

.vip-generator-page .timer-lbl,
.vip-instruction,
.vip-lb-panel .lb-header{
    color:#f8db7a;
}

.vip-stage-square{
    border-color:#6f5317!important;
    box-shadow:0 0 24px rgba(248,219,122,.12);
}

.vip-fg-board .fg-cell{
    border-right-width:1px;
    border-bottom-width:1px;
}

.vip-fg-board .fg-dot span{
    font-size:14px;
}

.profile-hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:20px;
    background:#101010;
    border:1px solid #242424;
    border-radius:8px;
}

.profile-main{
    display:flex;
    align-items:center;
    gap:16px;
    min-width:0;
}

.profile-avatar{
    width:82px;
    height:82px;
    border-radius:8px;
    border:1px solid #3a1919;
    object-fit:cover;
    background:#150808;
    flex:0 0 auto;
}

.profile-avatar-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#e05050;
    font-size:30px;
    font-weight:800;
}

.profile-title-block{
    min-width:0;
}

.profile-kicker{
    color:#777;
    font-size:11px;
    letter-spacing:2px;
    margin-bottom:5px;
}

.profile-title-block h1{
    color:#fff;
    font-size:30px;
    line-height:1.1;
    overflow-wrap:anywhere;
    margin-bottom:10px;
}

.profile-username-form{
    width:min(460px,70vw);
    display:grid;
    grid-template-columns:minmax(140px,1fr) auto;
    gap:8px;
    align-items:center;
    margin:0 0 12px;
}

.profile-username-form input{
    min-width:0;
    height:36px;
    padding:0 11px;
    color:#fff;
    background:#090909;
    border:1px solid #2a1616;
    border-radius:8px;
    outline:none;
    font-weight:800;
}

.profile-username-form input:focus{
    border-color:#e05050;
    box-shadow:0 0 0 3px rgba(224,80,80,.12);
}

.profile-username-form button{
    height:36px;
    padding:0 12px;
    color:#fff;
    background:#1a0b0b;
    border:1px solid #4a2020;
    border-radius:8px;
    font-size:11px;
    font-weight:900;
    letter-spacing:1px;
    cursor:pointer;
}

.profile-username-form button:hover{
    border-color:#e05050;
}

.profile-username-form button:disabled{
    opacity:.6;
    cursor:wait;
}

#profileUsernameStatus{
    grid-column:1 / -1;
    color:#888;
    font-size:11px;
    line-height:1.25;
}

#profileUsernameStatus.is-error{
    color:#ff6b6b;
}

.profile-sound-settings{
    width:150px;
    margin:18px 0 0 auto;
    padding:6px 7px;
    border:1px solid #241818;
    border-radius:8px;
    background:#0b0b0b;
}

.profile-title-block > .profile-sound-settings{
    display:none;
}

.profile-sound-settings-bottom{
    display:grid;
    gap:4px;
}

.profile-sound-settings-bottom > div{
    margin-bottom:0;
}

.profile-sound-settings-bottom label{
    margin-top:1px;
}

.profile-level-row{
    width:min(360px,70vw);
    display:flex;
    justify-content:space-between;
    gap:12px;
    color:#aaa;
    font-size:12px;
    margin-bottom:7px;
}

.profile-xp{
    width:min(360px,70vw);
    height:8px;
    background:#080808;
    border:1px solid #2a1616;
    border-radius:999px;
    overflow:hidden;
}

.profile-xp div{
    height:100%;
    background:linear-gradient(90deg,#7a0000,#e05050);
}

.profile-rank{
    min-width:126px;
    padding:14px 16px;
    border:1px solid #2a1616;
    border-radius:8px;
    text-align:center;
    background:#0b0b0b;
}

.profile-rank span{
    display:block;
    color:#777;
    font-size:10px;
    letter-spacing:1px;
    margin-bottom:5px;
}

.profile-rank strong{
    color:#fff;
    font-size:30px;
}

.profile-stats{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:10px;
    margin:14px 0;
}

.profile-stat{
    min-height:82px;
    padding:13px;
    border:1px solid #242424;
    border-radius:8px;
    background:#101010;
}

.profile-stat span{
    display:block;
    color:#777;
    font-size:11px;
    line-height:1.25;
    margin-bottom:10px;
}

.profile-stat strong{
    display:block;
    color:#fff;
    font-size:18px;
    line-height:1.15;
    overflow-wrap:anywhere;
}

.profile-section-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin:18px 0 10px;
}

.profile-section-head h2{
    color:#fff;
    font-size:20px;
    letter-spacing:1px;
}

.profile-section-head span{
    color:#888;
    font-size:12px;
}

.profile-achievements-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.profile-achievement{
    display:flex;
    gap:12px;
    min-height:96px;
    padding:14px;
    border:1px solid #262626;
    border-radius:8px;
    background:#101010;
}

.profile-achievement.is-locked{
    opacity:.45;
    filter:grayscale(1);
}

.profile-achievement-icon{
    width:38px;
    height:38px;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    background:#1a0808;
    border:1px solid #4a1818;
    color:#fff;
    font-size:18px;
}

.profile-achievement h3{
    color:#fff;
    font-size:14px;
    margin-bottom:4px;
}

.profile-achievement p{
    color:#8a8a8a;
    font-size:12px;
    line-height:1.35;
    margin-bottom:7px;
}

.profile-achievement span{
    color:#e05050;
    font-size:11px;
    font-weight:700;
}

.achievement-toast-host{
    position:fixed;
    left:14px;
    top:66px;
    z-index:2000;
    pointer-events:none;
}

.achievement-toast{
    width:330px;
    max-width:calc(100vw - 28px);
    display:flex;
    gap:12px;
    padding:14px;
    border:1px solid #6a2020;
    border-radius:8px;
    background:rgba(14,14,14,.96);
    box-shadow:0 16px 38px rgba(0,0,0,.45),0 0 24px rgba(180,0,0,.18);
    transform:translateX(calc(-100% - 24px));
    opacity:0;
    transition:transform .24s ease,opacity .24s ease;
}

.achievement-toast.is-visible{
    transform:translateX(0);
    opacity:1;
}

.achievement-toast-icon{
    width:42px;
    height:42px;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    background:#1a0808;
    border:1px solid #6a2020;
    color:#fff;
    font-size:20px;
}

.achievement-toast-kicker{
    color:#e05050;
    font-size:10px;
    letter-spacing:2px;
    margin-bottom:3px;
}

.achievement-toast-title{
    color:#fff;
    font-size:15px;
    font-weight:800;
    line-height:1.2;
}

.achievement-toast-desc{
    color:#aaa;
    font-size:12px;
    line-height:1.35;
    margin-top:3px;
}

.achievement-toast-xp{
    color:#e05050;
    font-size:11px;
    font-weight:800;
    margin-top:7px;
}

.lb-profile-btn{
    display:inline;
    max-width:100%;
    border:0;
    background:transparent;
    color:inherit;
    font:inherit;
    text-align:left;
    cursor:pointer;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.lb-profile-btn:hover{
    color:#e05050;
    text-decoration:underline;
}

.lb-profile-btn.is-me{
    color:#e05050;
}

.lb-profile-btn.is-vip{
    color:#f8db7a;
    font-weight:900;
    text-shadow:0 0 12px rgba(248,219,122,.18);
}

.lb-profile-btn.is-vip:hover{
    color:#ffe28a;
}

.profile-modal{
    position:fixed;
    inset:0;
    z-index:3000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.profile-modal.is-open{
    display:flex;
}

.profile-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.68);
}

.profile-modal-card{
    position:relative;
    width:min(560px,100%);
    max-height:min(760px,calc(100dvh - 36px));
    overflow:auto;
    border:1px solid #342020;
    border-radius:8px;
    background:#101010;
    box-shadow:0 18px 60px rgba(0,0,0,.55);
    padding:18px;
}

.profile-modal-close{
    position:absolute;
    top:10px;
    right:10px;
    width:34px;
    height:34px;
    border:1px solid #3a1818;
    border-radius:7px;
    background:#160808;
    color:#ddd;
    font-size:22px;
    line-height:1;
    cursor:pointer;
}

.profile-modal-close:hover{
    color:#fff;
    border-color:#e05050;
}

.profile-modal-loading{
    color:#999;
    padding:36px 8px;
    text-align:center;
}

.profile-modal-head{
    display:flex;
    gap:14px;
    align-items:center;
    padding-right:40px;
    margin-bottom:14px;
}

.profile-modal-avatar{
    width:70px;
    height:70px;
    border-radius:8px;
    border:1px solid #3a1919;
    object-fit:cover;
    background:#150808;
    flex:0 0 auto;
}

.profile-modal-avatar-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#e05050;
    font-size:26px;
    font-weight:800;
}

.profile-modal-kicker{
    color:#777;
    font-size:10px;
    letter-spacing:2px;
    margin-bottom:4px;
}

.profile-modal-head h2{
    color:#fff;
    font-size:24px;
    line-height:1.15;
    overflow-wrap:anywhere;
}

.profile-modal-level{
    color:#e05050;
    font-size:12px;
    margin-top:5px;
}

.profile-modal-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    margin:12px 0 16px;
}

.profile-modal-stats div{
    min-height:64px;
    border:1px solid #242424;
    border-radius:8px;
    background:#0b0b0b;
    padding:10px;
}

.profile-modal-stats span{
    display:block;
    color:#777;
    font-size:10px;
    margin-bottom:7px;
}

.profile-modal-stats strong{
    display:block;
    color:#fff;
    font-size:14px;
    overflow-wrap:anywhere;
}

.profile-modal-ach-head{
    color:#ddd;
    font-size:13px;
    font-weight:800;
    margin-bottom:9px;
}

.profile-modal-achievements{
    display:grid;
    gap:8px;
}

.profile-modal-achievement{
    display:flex;
    gap:10px;
    align-items:flex-start;
    border:1px solid #242424;
    border-radius:8px;
    background:#0b0b0b;
    padding:10px;
}

.profile-modal-achievement > span{
    width:32px;
    height:32px;
    border-radius:7px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#1a0808;
    border:1px solid #4a1818;
    flex:0 0 auto;
}

.profile-modal-achievement strong{
    display:block;
    color:#fff;
    font-size:13px;
    margin-bottom:3px;
}

.profile-modal-achievement small{
    display:block;
    color:#888;
    font-size:12px;
    line-height:1.35;
}

.profile-modal-empty{
    color:#888;
    border:1px solid #242424;
    border-radius:8px;
    padding:12px;
    background:#0b0b0b;
}

a{color:#5a9aff;text-decoration:none}
a:hover{text-decoration:underline}

/* NAV */
.navbar{
    background:#0e0e0e;
    border-bottom:1px solid #1c1c1c;
    height:46px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 18px;
    flex-shrink:0;
}

.nav-logo{
    font-size:16px;
    font-weight:700;
    color:#fff;
    letter-spacing:3px;
}

.accent{color:#cc2222}

.nav-right{
    display:flex;
    align-items:center;
    gap:10px;
}

.nav-user{
    display:flex;
    align-items:center;
    gap:8px;
}

.nav-avatar{
    width:30px;
    height:30px;
    border-radius:50%;
    border:1px solid #2a4a2a;
    object-fit:cover;
}

.nav-avatar-ph{
    width:30px;
    height:30px;
    border-radius:50%;
    background:#1a2a1a;
    border:1px solid #2a4a2a;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    color:#5a8a5a;
    font-weight:700;
}

.nav-name{
    font-size:12px;
    color:#999;
}

.nav-btn{
    font-size:10px;
    color:#dd3333;
    border:1px solid #5a1a1a;
    border-radius:4px;
    padding:4px 10px;
    letter-spacing:1px;
}

.nav-btn:hover{
    background:#1a0000;
    text-decoration:none;
}

/* AUTH */
.auth-wrap{
    min-height:calc(100vh - 46px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.auth-card{
    background:#111;
    border:1px solid #222;
    border-radius:12px;
    width:320px;
    max-width:100%;
    padding:28px;
}

.auth-logo{
    font-size:22px;
    font-weight:700;
    color:#fff;
    text-align:center;
    letter-spacing:4px;
    margin-bottom:4px;
}

.auth-sub{
    font-size:10px;
    color:#555;
    text-align:center;
    letter-spacing:2px;
    margin-bottom:6px;
}

.welcome-desc{
    font-size:13px;
    color:#666;
    text-align:center;
    line-height:1.7;
}

.auth-tabs{
    display:flex;
    border-bottom:1px solid #1e1e1e;
    margin-bottom:18px;
    margin-top:8px;
}

.auth-tab{
    flex:1;
    text-align:center;
    font-size:11px;
    padding:8px 0;
    color:#555;
    letter-spacing:1px;
    border-bottom:2px solid transparent;
}

.auth-tab.active{
    color:#e05050;
    border-bottom-color:#e05050;
}

.auth-error{
    background:#1a0000;
    border:1px solid #5a0000;
    border-radius:5px;
    padding:8px 10px;
    font-size:12px;
    color:#f55;
    margin-bottom:14px;
}

.field{
    margin-bottom:12px;
}

.field label{
    display:block;
    font-size:10px;
    color:#555;
    margin-bottom:5px;
    letter-spacing:1px;
}

.field input{
    width:100%;
    background:#0d0d0d;
    border:1px solid #2a2a2a;
    border-radius:5px;
    padding:9px 11px;
    font-size:13px;
    color:#ddd;
    outline:none;
    transition:border-color .2s;
}

.field input:focus{
    border-color:#555;
}

.auth-main-btn{
    width:100%;
    display:block;
    min-height:46px;
    background:#7a0000;
    border:none;
    border-radius:6px;
    padding:11px;
    font-size:12px;
    color:#fff;
    letter-spacing:2px;
    cursor:pointer;
    font-weight:700;
    transition:background .2s;
    touch-action:manipulation;
    position:relative;
    z-index:5;
    -webkit-tap-highlight-color:transparent;
}

.auth-main-btn:hover{
    background:#9a0000;
}

.register-wrap{
    width:100%;
    display:grid;
    grid-template-columns:minmax(320px, 1.05fr) minmax(320px, 420px) minmax(430px, 1.25fr);
    gap:22px;
    align-items:center;
    justify-content:stretch;
    padding:26px 22px;
    min-height:calc(100vh - 46px);
}

.register-left{
    position:relative;
    z-index:2;
    order:2;
    align-self:center;
    justify-self:center;
    width:100%;
    max-width:420px;
    padding:22px;
    border:1px solid rgba(224,80,80,.5);
    border-radius:8px;
    background:linear-gradient(180deg, rgba(18,6,8,.88), rgba(6,6,6,.9));
    overflow:hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.03) inset,
        0 0 28px rgba(224,40,40,.24),
        0 24px 85px rgba(0,0,0,.58);
}

.register-left::before{
    content:'';
    position:absolute;
    inset:-35%;
    z-index:-2;
    border-radius:10px;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,70,70,.34), transparent 34%),
        radial-gradient(circle at 78% 18%, rgba(110,110,120,.22), transparent 30%),
        radial-gradient(circle at 55% 82%, rgba(255,40,40,.18), transparent 38%),
        linear-gradient(135deg, rgba(255,80,80,.52), rgba(255,80,80,0) 34%, rgba(120,120,130,.25) 68%, rgba(255,80,80,.34));
    opacity:.72;
    filter:blur(18px);
    animation:registerSmokeDrift 12s ease-in-out infinite alternate;
}

.register-left::after{
    content:'';
    position:absolute;
    inset:0;
    z-index:-1;
    border-radius:8px;
    background:
        linear-gradient(115deg, rgba(255,255,255,.08), transparent 22%, rgba(255,60,60,.08) 58%, transparent 82%),
        repeating-linear-gradient(120deg, rgba(255,255,255,.025) 0 1px, transparent 1px 18px);
    opacity:.48;
    pointer-events:none;
    animation:registerSmokeSheen 9s ease-in-out infinite alternate;
}

.register-kicker{
    color:#ff5555;
    font-size:11px;
    font-weight:800;
    letter-spacing:3px;
    margin-bottom:10px;
}

.register-title{
    color:#fff;
    font-size:34px;
    line-height:1.08;
    letter-spacing:0;
    margin:0 0 12px;
}

.register-text{
    color:#9a9a9a;
    font-size:14px;
    line-height:1.55;
    margin:0 0 20px;
}

.register-card{
    width:100%;
    border-radius:8px;
    border-color:rgba(224,80,80,.28);
    background:rgba(12,12,12,.72);
    box-shadow:0 14px 52px rgba(0,0,0,.42), 0 0 24px rgba(224,40,40,.08);
}

.register-showcase{
    display:contents;
}

.register-preview,
.register-character-panel{
    min-width:0;
    background:transparent;
    border:0;
    border-radius:0;
    overflow:hidden;
    box-shadow:none;
}

.register-preview{
    order:3;
    align-self:stretch;
    display:flex;
    flex-direction:column;
    min-height:calc(100vh - 98px);
    position:relative;
    overflow:visible;
    background:linear-gradient(180deg, rgba(54,54,58,.58) 0%, rgba(36,36,40,.36) 52%, rgba(10,10,10,0) 100%);
}

.register-preview::before{
    content:'';
    position:absolute;
    z-index:-1;
    left:5%;
    right:5%;
    top:14%;
    bottom:7%;
    border-radius:28px;
    background:radial-gradient(circle at 50% 42%, rgba(255,55,55,.24) 0%, rgba(255,55,55,.11) 38%, rgba(255,55,55,0) 72%);
    filter:blur(26px);
}

.register-preview-head{
    display:grid;
    grid-template-columns:42px 1fr 42px;
    align-items:center;
    gap:10px;
    min-height:52px;
    padding:8px 12px;
    border-bottom:0;
}

.register-preview-title{
    color:#fff;
    font-size:13px;
    font-weight:900;
    letter-spacing:2px;
    text-align:center;
}

.register-preview-question{
    padding:8px 12px 14px;
    color:#fff;
    font-size:26px;
    font-weight:900;
    line-height:1.05;
    letter-spacing:0;
    text-align:center;
}

.register-arrow{
    width:38px;
    height:34px;
    border-radius:6px;
    border:1px solid #5a1a1a;
    background:#160707;
    color:#fff;
    font-size:24px;
    line-height:1;
    cursor:pointer;
}

.register-arrow:hover{
    background:#2a0909;
    border-color:#e05050;
}

.register-slides{
    position:relative;
    flex:1;
    min-height:0;
    background:transparent;
    touch-action:pan-y;
    overflow:visible;
}

.register-slide{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    transform:translateX(16px);
    transition:opacity .22s ease, transform .22s ease;
    pointer-events:none;
    margin:0;
    padding:0;
}

.register-slide.active{
    opacity:1;
    transform:translateX(0);
    pointer-events:auto;
}

.register-slide img{
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius:0;
    filter:drop-shadow(0 22px 36px rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(255,60,60,.12));
}

.register-character-panel{
    order:1;
    position:relative;
    min-height:calc(100vh - 98px);
    align-self:stretch;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    overflow:hidden;
    background:transparent;
}

.register-character-panel::before{
    content:'';
    position:absolute;
    left:8%;
    bottom:3%;
    width:72%;
    height:46%;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,64,64,.36) 0%, rgba(255,64,64,.18) 34%, rgba(255,64,64,0) 72%);
    filter:blur(28px);
    transform:translateY(16%);
}

.register-character-panel::after{
    content:'';
    position:absolute;
    z-index:2;
    left:-10%;
    right:-10%;
    bottom:-2%;
    height:32%;
    border-radius:0;
    background:
        linear-gradient(to bottom, rgba(20,20,22,0) 0%, rgba(32,32,35,.36) 58%, rgba(8,8,8,0) 100%),
        radial-gradient(ellipse at 35% 92%, rgba(0,0,0,.48) 0%, rgba(0,0,0,.25) 28%, rgba(0,0,0,0) 62%);
    filter:blur(0);
    transform:none;
    pointer-events:none;
}

.register-character{
    position:absolute;
    z-index:1;
    inset:0 0 -7% 0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:18% center;
    opacity:.96;
    transform:scale(1.22) translate(-3%, 8%);
    transform-origin:left bottom;
    -webkit-mask-image:linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,.82) 88%, transparent 100%);
    mask-image:linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,.82) 88%, transparent 100%);
}

.register-slogan{
    position:absolute;
    z-index:4;
    left:60%;
    top:14%;
    width:min(300px, 36%);
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    color:#ff4f4f;
    background:linear-gradient(90deg, #fff 0%, #ffeded 38%, #ff4747 74%, #ff9a9a 100%);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    font-size:28px;
    font-weight:900;
    line-height:1.06;
    text-align:left;
    filter:drop-shadow(0 4px 14px rgba(0,0,0,.92)) drop-shadow(0 0 18px rgba(255,50,50,.45));
}

@keyframes registerSmokeDrift{
    0%{
        transform:translate3d(-5%, -2%, 0) scale(1);
    }
    100%{
        transform:translate3d(7%, 5%, 0) scale(1.08);
    }
}

@keyframes registerSmokeSheen{
    0%{
        opacity:.28;
        transform:translateX(-3%);
    }
    100%{
        opacity:.58;
        transform:translateX(3%);
    }
}

.welcome-card .welcome-desc{
    margin:14px 0 0;
}

.welcome-actions{
    margin-top:18px;
}

.welcome-actions .auth-main-btn{
    text-align:center;
    text-decoration:none;
    margin-bottom:10px;
}

.welcome-actions .auth-main-btn:hover{
    text-decoration:none;
}

.auth-remember{
    display:flex;
    align-items:center;
    gap:9px;
    margin:2px 0 14px;
    color:#777;
    font-size:12px;
    cursor:pointer;
    user-select:none;
}

.auth-remember input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.auth-remember-box{
    width:18px;
    height:18px;
    border:1px solid #3a1414;
    border-radius:5px;
    background:#0b0b0b;
    box-shadow:0 0 0 1px rgba(255,255,255,.02) inset;
    position:relative;
    flex-shrink:0;
    transition:background .15s,border-color .15s,box-shadow .15s;
}

.auth-remember-box::after{
    content:'';
    position:absolute;
    left:5px;
    top:2px;
    width:5px;
    height:9px;
    border:solid #fff;
    border-width:0 2px 2px 0;
    opacity:0;
    transform:rotate(45deg) scale(.75);
    transition:opacity .15s,transform .15s;
}

.auth-remember input:checked + .auth-remember-box{
    background:#7a0000;
    border-color:#dd4444;
    box-shadow:0 0 12px rgba(204,34,34,.25);
}

.auth-remember input:checked + .auth-remember-box::after{
    opacity:1;
    transform:rotate(45deg) scale(1);
}

.auth-remember-text{
    line-height:1.25;
}

.auth-sec-btn{
    display:block;
    width:100%;
    background:transparent;
    border:1px solid #2a2a2a;
    border-radius:6px;
    padding:10px;
    font-size:12px;
    color:#888;
    letter-spacing:2px;
    cursor:pointer;
    text-align:center;
    transition:border-color .2s;
}

.auth-sec-btn:hover{
    border-color:#444;
    text-decoration:none;
    color:#aaa;
}

.auth-divider{
    display:flex;
    align-items:center;
    gap:10px;
    margin:14px 0;
}

.auth-divider::before,
.auth-divider::after{
    content:'';
    flex:1;
    height:1px;
    background:#1e1e1e;
}

.auth-divider span{
    font-size:10px;
    color:#333;
    white-space:nowrap;
}

.auth-hint{
    font-size:11px;
    color:#444;
    line-height:1.5;
}

/* TABS */
.generator-tabs{
    display:flex;
    justify-content:center;
    gap:14px;
    padding:10px 0 4px;
    flex-shrink:0;
}

.generator-tab{
    display:inline-block;
    padding:9px 30px;
    font-size:11px;
    font-weight:700;
    letter-spacing:2px;
    color:#888;
    background:#0d0d0d;
    border:1px solid #3a1414;
    border-radius:8px;
    transition:all .2s ease;
    cursor:pointer;
}

.generator-tab:hover{
    color:#fff;
    background:#160606;
    border-color:#cc2222;
    text-decoration:none;
    transform:translateY(-1px);
    box-shadow:0 0 14px rgba(204,34,34,.35);
}

.generator-tab.active{
    color:#fff;
    background:linear-gradient(135deg,#7a0000,#a80000);
    border-color:#dd4444;
    box-shadow:0 0 16px rgba(204,34,34,.4),inset 0 0 8px rgba(255,255,255,.06);
}

.generator-tab.vip-tab{
    color:#d8b35a;
    border-color:#6f5317;
}

.generator-tab.vip-tab:hover,
.generator-tab.vip-tab.active{
    color:#111;
    background:linear-gradient(135deg,#f8db7a,#a97812);
    border-color:#ffe28a;
    box-shadow:0 0 20px rgba(248,219,122,.28);
}

.generator-tab.pvp-tab{
    color:#8fd5ff;
    border-color:#16435e;
}

.generator-tab.pvp-tab:hover,
.generator-tab.pvp-tab.active{
    color:#061018;
    background:linear-gradient(135deg,#8fd5ff,#2f8fdd);
    border-color:#a9e2ff;
    box-shadow:0 0 20px rgba(143,213,255,.22);
}

.pvp-page{
    width:min(1120px,calc(100% - 28px));
    margin:20px auto 42px;
    color:#fff;
}

.pvp-shell{
    margin-top:14px;
    border:1px solid #20252a;
    border-radius:8px;
    background:#0f1011;
    padding:18px;
}

.pvp-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    margin-bottom:16px;
}

.pvp-head span,
.pvp-card-top span{
    display:block;
    color:#777;
    font-size:10px;
    letter-spacing:2px;
    font-weight:800;
}

.pvp-head h1{
    margin:4px 0 0;
    font-size:30px;
    letter-spacing:0;
}

.pvp-rules{
    border:1px solid #203345;
    border-radius:8px;
    background:#0b151d;
    color:#8fd5ff;
    padding:10px 12px;
    font-size:12px;
    font-weight:800;
}

.pvp-generator-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.pvp-generator-card{
    border:1px solid #23282d;
    border-radius:8px;
    background:#0a0b0c;
    padding:14px;
}

.pvp-card-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
}

.pvp-card-top strong{
    display:block;
    margin-top:4px;
    font-size:22px;
}

.pvp-cups{
    color:#f8db7a;
    font-weight:900;
    white-space:nowrap;
}

.pvp-rank-line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin:16px 0;
    padding:10px;
    border:1px solid #1c2934;
    border-radius:8px;
    background:#0b1218;
}

.pvp-rank-badge{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.pvp-rank-icon{
    width:46px;
    height:46px;
    display:flex!important;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#111;
    font-size:28px!important;
    line-height:1;
    flex:0 0 46px;
}

.pvp-rank-line .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#8fd5ff;
    font-size:18px;
    font-weight:900;
}

.pvp-rank-badge div small{
    display:block;
    margin-top:2px;
    color:#aaa;
}

.pvp-rank-line small{
    color:#888;
    font-weight:800;
}

.pvp-rank-line.rank-wood{
    border-color:#6b4428;
    background:#170f09;
}

.pvp-rank-line.rank-wood .pvp-rank-icon{
    background:#241509;
    box-shadow:0 0 18px rgba(151,91,42,.18);
}

.pvp-rank-line.rank-wood .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#c48655;
}

.pvp-rank-line.rank-bronze{
    border-color:#6d4628;
    background:#160e08;
}

.pvp-rank-line.rank-bronze .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#d58b4a;
}

.pvp-rank-line.rank-silver{
    border-color:#77818b;
    background:#111417;
}

.pvp-rank-line.rank-silver .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#cfd9e3;
}

.pvp-rank-line.rank-gold{
    border-color:#8a671b;
    background:#171107;
}

.pvp-rank-line.rank-gold .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#f8db7a;
}

.pvp-rank-line.rank-diamond{
    border-color:#63d9ff;
    background:#07141a;
}

.pvp-rank-line.rank-diamond .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#9cecff;
}

.pvp-rank-line.rank-sapphire{
    border-color:#356dff;
    background:#071022;
}

.pvp-rank-line.rank-sapphire .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#7ba4ff;
}

.pvp-rank-line.rank-legend{
    border-color:#b66bff;
    background:#160923;
}

.pvp-rank-line.rank-legend .pvp-rank-badge span:not(.pvp-rank-icon){
    color:#d8b8ff;
}

.pvp-search-btn,
.pvp-ready-btn,
.pvp-exit-btn,
.pvp-cancel-btn{
    width:100%;
    min-height:42px;
    border-radius:8px;
    border:1px solid #2f8fdd;
    background:#0b1720;
    color:#8fd5ff;
    font-weight:900;
    letter-spacing:1px;
}

.pvp-search-btn:hover,
.pvp-ready-btn:hover{
    background:#8fd5ff;
    color:#061018;
}

.pvp-match-panel{
    margin-top:12px;
    border:1px solid #243241;
    border-radius:8px;
    background:#090d10;
    padding:14px;
}

.pvp-panel-title{
    color:#fff;
    font-size:18px;
    font-weight:900;
}

.pvp-status{
    color:#aaa;
    margin-top:6px;
}

.pvp-searching{
    min-height:150px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin:14px 0;
    border:1px solid #1f3447;
    border-radius:8px;
    background:#071019;
    text-align:center;
}

.pvp-searching[hidden]{
    display:none!important;
}

.pvp-spinner{
    width:42px;
    height:42px;
    border-radius:50%;
    border:3px solid rgba(143,213,255,.18);
    border-top-color:#8fd5ff;
    animation:pvpSpin .9s linear infinite;
}

.pvp-searching strong{
    color:#fff;
    font-size:20px;
    letter-spacing:0;
}

.pvp-searching span{
    color:#aaa;
    font-size:13px;
}

.pvp-searching b{
    color:#8fd5ff;
    font-size:18px;
}

.pvp-countdown{
    position:fixed;
    inset:0;
    z-index:5000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:22px;
    background:rgba(0,0,0,.62);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    text-align:center;
}

.pvp-countdown[hidden]{
    display:none!important;
}

.pvp-countdown-card{
    width:min(560px,100%);
    min-height:330px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:14px;
    border:1px solid #31532f;
    border-radius:12px;
    background:
        linear-gradient(135deg,rgba(115,255,152,.14),rgba(143,213,255,.08)),
        #071208;
    box-shadow:0 26px 90px rgba(0,0,0,.55),0 0 42px rgba(115,255,152,.16);
    padding:30px;
    position:relative;
    overflow:hidden;
}

.pvp-countdown span{
    color:#9bffb5;
    font-size:18px;
    font-weight:900;
    letter-spacing:2px;
    text-transform:uppercase;
}

.pvp-countdown strong{
    color:#fff;
    font-size:132px;
    line-height:1;
    font-weight:900;
    text-shadow:0 0 34px rgba(115,255,152,.3);
}

.pvp-countdown small{
    max-width:360px;
    color:#bfcfc4;
    font-size:14px;
    line-height:1.35;
    font-weight:800;
}

.pvp-countdown.mode-search .pvp-countdown-card,
.pvp-countdown.mode-found .pvp-countdown-card,
.pvp-countdown.mode-wait .pvp-countdown-card{
    border-color:#24506d;
    background:
        linear-gradient(135deg,rgba(143,213,255,.15),rgba(70,120,255,.08)),
        #071019;
    box-shadow:0 26px 90px rgba(0,0,0,.55),0 0 42px rgba(143,213,255,.14);
}

.pvp-countdown.mode-search strong,
.pvp-countdown.mode-wait strong{
    font-size:72px;
    letter-spacing:8px;
}

.pvp-countdown.mode-search .pvp-countdown-card::before{
    content:"";
    width:82px;
    height:82px;
    border-radius:50%;
    border:5px solid rgba(143,213,255,.16);
    border-top-color:#8fd5ff;
    animation:pvpSpin .9s linear infinite;
}

.pvp-countdown.mode-found strong{
    font-size:44px;
    line-height:1.1;
    overflow-wrap:anywhere;
    color:#8fd5ff;
}

.pvp-countdown.mode-victory .pvp-countdown-card{
    border-color:#8a6a22;
    background:
        radial-gradient(circle at 50% 0,rgba(248,219,122,.28),transparent 44%),
        linear-gradient(135deg,rgba(248,219,122,.16),rgba(115,255,152,.08)),
        #120f05;
    box-shadow:0 26px 90px rgba(0,0,0,.62),0 0 58px rgba(248,219,122,.2);
}

.pvp-countdown.mode-victory span{
    color:#f8db7a;
}

.pvp-countdown.mode-victory strong{
    font-size:58px;
    color:#fff;
    text-shadow:0 0 34px rgba(248,219,122,.3);
}

.pvp-overlay-btn{
    min-height:44px;
    padding:0 18px;
    border-radius:8px;
    border:1px solid #2f8fdd;
    background:#0b1720;
    color:#8fd5ff;
    font-size:12px;
    font-weight:900;
    letter-spacing:1px;
    cursor:pointer;
}

.pvp-overlay-btn:hover{
    background:#8fd5ff;
    color:#061018;
}

.pvp-overlay-btn.is-gold{
    border-color:#8a6a22;
    background:#1c1606;
    color:#f8db7a;
}

.pvp-overlay-btn.is-gold:hover{
    background:#f8db7a;
    color:#111;
}

.pvp-overlay-progress{
    width:min(430px,100%);
    display:grid;
    gap:9px;
    margin:4px 0 6px;
}

.pvp-overlay-progress[hidden]{
    display:none!important;
}

.pvp-overlay-progress > div:first-child{
    display:flex;
    justify-content:space-between;
    gap:12px;
    color:#d9d9d9;
    font-size:12px;
    font-weight:900;
}

.pvp-overlay-progress b{
    color:#f8db7a;
    font-weight:900;
}

.pvp-overlay-progress-bar{
    height:12px;
    border-radius:999px;
    border:1px solid #624b18;
    background:#0b0b0b;
    overflow:hidden;
}

.pvp-overlay-progress-bar i{
    display:block;
    height:100%;
    width:0;
    border-radius:inherit;
    background:linear-gradient(90deg,#8fd5ff,#f8db7a);
    box-shadow:0 0 18px rgba(248,219,122,.25);
    transition:width .35s ease;
}

.pvp-confetti{
    position:absolute;
    inset:0;
    pointer-events:none;
    overflow:hidden;
}

.pvp-confetti[hidden]{
    display:none!important;
}

.pvp-confetti i{
    position:absolute;
    left:var(--x);
    top:-14px;
    width:8px;
    height:16px;
    border-radius:2px;
    background:var(--c);
    animation:pvpConfetti var(--d) linear infinite;
}

@keyframes pvpConfetti{
    0%{transform:translateY(-20px) rotate(0deg);opacity:0}
    12%{opacity:1}
    100%{transform:translateY(390px) rotate(520deg);opacity:0}
}

@keyframes pvpSpin{
    to{transform:rotate(360deg)}
}

.pvp-score{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:14px 0;
}

.pvp-score > div{
    border:1px solid #1e252b;
    border-radius:8px;
    padding:10px;
    background:#0d0f11;
}

.pvp-score span{
    display:block;
    color:#777;
    font-size:11px;
    font-weight:900;
    margin-bottom:8px;
}

.pvp-round-results{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:14px 0;
}

.pvp-round-results[hidden]{
    display:none!important;
}

.pvp-round-results > div{
    border:1px solid #26313a;
    border-radius:8px;
    background:#0b1014;
    padding:12px;
}

.pvp-round-results > div:last-child{
    border-color:#24452e;
    background:#08120b;
}

.pvp-round-results span{
    display:block;
    color:#888;
    font-size:11px;
    font-weight:900;
    margin-bottom:6px;
    text-transform:uppercase;
}

.pvp-round-results strong{
    display:block;
    color:#fff;
    font-size:24px;
    font-family:'Courier New',monospace;
}

.pvp-round-results > div:last-child strong{
    color:#73ff98;
}

.pvp-game-frame-wrap{
    margin:14px 0;
    border:1px solid #27323d;
    border-radius:8px;
    background:#050607;
    overflow:hidden;
    height:min(78vh,860px);
    min-height:620px;
}

.pvp-game-frame-wrap[hidden]{
    display:none!important;
}

.pvp-game-frame-wrap iframe{
    width:100%;
    height:100%;
    border:0;
    display:block;
    background:#070707;
}

.pvp-round-dots{
    display:flex;
    gap:8px;
}

.pvp-round-dots span{
    width:18px;
    height:18px;
    border-radius:50%;
    border:1px solid #444;
    background:#141414;
}

.pvp-round-dots span.is-win{
    background:#33d469;
    border-color:#7cff9e;
    box-shadow:0 0 14px rgba(51,212,105,.32);
}

.pvp-round-dots span.is-lose{
    background:#e05050;
    border-color:#ff8585;
    box-shadow:0 0 14px rgba(224,80,80,.28);
}

.pvp-actions{
    display:flex;
    gap:10px;
}

.pvp-cancel-btn{
    border-color:#4b2424;
    background:#160d0d;
    color:#e05050;
}

.pvp-exit-btn{
    border-color:#604a20;
    background:#171105;
    color:#f8db7a;
}

.pvp-exit-btn:hover{
    background:#f8db7a;
    color:#111;
}

.pvp-duel-box{
    margin-top:12px;
    border:1px solid #2a2630;
    border-radius:8px;
    background:#0c0b10;
    padding:14px;
}

.pvp-top-box{
    margin-top:12px;
    border:1px solid #243241;
    border-radius:8px;
    background:#090d10;
    padding:14px;
}

.pvp-top-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}

.pvp-top-head span{
    color:#8fd5ff;
    font-size:11px;
    font-weight:900;
    letter-spacing:2px;
}

.pvp-top-head strong{
    color:#fff;
    font-size:16px;
}

.pvp-top-list{
    display:grid;
    gap:7px;
}

.pvp-top-row{
    display:grid;
    grid-template-columns:48px minmax(0,1.1fr) minmax(120px,.8fr) 82px minmax(140px,1fr);
    gap:10px;
    align-items:center;
    padding:10px;
    border:1px solid #1e252b;
    border-radius:8px;
    background:#0d0f11;
}

.pvp-top-place{
    color:#8fd5ff;
    font-weight:900;
}

.pvp-top-name{
    color:#fff;
    font-weight:900;
    overflow-wrap:anywhere;
}

.pvp-top-rank{
    color:#ddd;
    font-weight:900;
}

.pvp-top-points{
    color:#f8db7a;
    font-weight:900;
    text-align:right;
}

.pvp-top-meta{
    color:#888;
    font-size:12px;
    font-weight:800;
    text-align:right;
}

.pvp-top-empty{
    color:#888;
    font-size:13px;
    font-weight:800;
}

.pvp-duel-box > div:first-child span{
    display:block;
    color:#777;
    font-size:10px;
    letter-spacing:2px;
    font-weight:800;
}

.pvp-duel-box > div:first-child strong{
    display:block;
    color:#fff;
    margin-top:4px;
    font-size:18px;
}

.pvp-duel-controls{
    display:grid;
    grid-template-columns:180px minmax(0,1fr) 220px;
    gap:10px;
    margin-top:12px;
}

.pvp-duel-controls select,
.pvp-duel-controls input{
    min-height:42px;
    border:1px solid #2b2b2b;
    border-radius:8px;
    background:#080808;
    color:#fff;
    padding:0 12px;
    font-weight:800;
}

.pvp-duel-controls button{
    min-height:42px;
    border:1px solid #6b4b94;
    border-radius:8px;
    background:#160d22;
    color:#d8b8ff;
    font-weight:900;
    letter-spacing:1px;
}

.pvp-duel-controls button:hover{
    background:#d8b8ff;
    color:#14081e;
}

.pvp-duel-status{
    min-height:18px;
    margin-top:8px;
    color:#aaa;
    font-size:12px;
    font-weight:800;
}

.pvp-invite-toast{
    position:fixed;
    right:18px;
    top:72px;
    z-index:4000;
    width:min(360px,calc(100vw - 24px));
    border:1px solid #6b4b94;
    border-radius:8px;
    background:#0c0812;
    color:#fff;
    padding:14px;
    box-shadow:0 18px 50px rgba(0,0,0,.45),0 0 24px rgba(216,184,255,.12);
}

.pvp-invite-toast[hidden]{
    display:none!important;
}

.pvp-invite-kicker{
    color:#d8b8ff;
    font-size:10px;
    font-weight:900;
    letter-spacing:2px;
}

.pvp-invite-title{
    margin-top:6px;
    font-size:20px;
    font-weight:900;
}

.pvp-invite-meta{
    margin-top:4px;
    color:#aaa;
    font-size:12px;
}

.pvp-invite-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:12px;
}

.pvp-invite-actions button{
    min-height:38px;
    border-radius:8px;
    font-weight:900;
    letter-spacing:1px;
}

.pvp-invite-accept{
    border:1px solid #58d77b;
    background:#0b1a10;
    color:#73ff98;
}

.pvp-invite-decline{
    border:1px solid #6b2b2b;
    background:#170909;
    color:#ff7777;
}

/* PAGE */
.generator-page{
    height:calc(100vh - 46px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.game-page{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding:6px 8px 4px;
    overflow:hidden;
    backdrop-filter:blur(10px);
}

.game-header{
    text-align:center;
    flex-shrink:0;
    margin-bottom:6px;
}

.timer-lbl{
    font-size:9px;
    color:#444;
    letter-spacing:3px;
}

.timer-display{
    font-size:28px;
    font-family:'Courier New',monospace;
    color:#fff;
    letter-spacing:5px;
    line-height:1.1;
}

/* DESKTOP LAYOUT */
.game-layout{
    display:grid;
    grid-template-columns:minmax(220px,.9fr) minmax(560px,1.4fr) minmax(220px,.9fr);
    gap:40px;
    flex:1;
    min-height:0;
    align-items:stretch;
}

.left-col,
.right-col{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-height:0;
    overflow:hidden;
}

.left-col{padding-right:20px}
.right-col{padding-left:20px}

.left-col{
    overflow:visible;
    position:relative;
    z-index:5;
}

.player-level-card{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:108px;
    margin-bottom:12px;
    padding:12px;
    border:1px solid #252525;
    border-radius:8px;
    background:#101010;
    position:relative;
    overflow:visible;
    z-index:20;
}

.player-level-card-mobile{
    display:none;
}

.player-level-ring{
    --progress:0;
    width:74px;
    height:74px;
    border-radius:50%;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    background:conic-gradient(#e05050 calc(var(--progress) * 1%),#222 0);
    box-shadow:0 0 24px rgba(224,80,80,.12);
    position:relative;
}

.player-level-ring-center{
    position:absolute;
    inset:9px;
    width:56px;
    height:56px;
    border-radius:50%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    background:#080808;
    border:1px solid #2a1616;
    box-sizing:border-box;
}

.player-level-ring-center span{
    color:#777;
    font-size:9px;
    font-weight:900;
    letter-spacing:1px;
    line-height:1;
    display:block;
}

.player-level-ring-center strong{
    color:#fff;
    font-size:22px;
    line-height:1;
    display:block;
    transform:translateY(-1px);
}

.player-level-info{
    min-width:0;
    display:grid;
    gap:4px;
}

.player-level-info strong{
    color:#fff;
    font-size:16px;
    overflow-wrap:anywhere;
}

.player-level-info span{
    color:#aaa;
    font-size:11px;
    font-weight:800;
}

.player-level-empty{
    color:#888;
    font-size:12px;
    font-weight:800;
}

.player-level-tip{
    position:absolute;
    left:104px;
    top:-18px;
    width:min(250px,calc(100vw - 36px));
    padding:10px 32px 10px 12px;
    border:1px solid #3a2424;
    border-radius:8px;
    background:#f7f7f7;
    color:#111;
    box-shadow:0 16px 38px rgba(0,0,0,.36);
    font-size:12px;
    line-height:1.3;
    font-weight:900;
    opacity:0;
    transform:translateY(5px);
    pointer-events:none;
    transition:opacity .2s,transform .2s;
    z-index:100;
}

.player-level-tip::before{
    content:"";
    position:absolute;
    left:-8px;
    top:36px;
    width:12px;
    height:12px;
    background:#f7f7f7;
    border-left:1px solid #3a2424;
    border-bottom:1px solid #3a2424;
    transform:rotate(45deg);
}

.player-level-tip.is-visible{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}

.player-level-tip-close{
    position:absolute;
    top:4px;
    right:6px;
    width:22px;
    height:22px;
    border:0;
    background:transparent;
    color:#111;
    font-size:18px;
    line-height:1;
    cursor:pointer;
}

.profile-level-card{
    width:min(460px,70vw);
    display:flex;
    align-items:center;
    gap:12px;
    margin:0 0 12px;
    padding:10px;
    border:1px solid #241818;
    border-radius:8px;
    background:#0b0b0b;
}

.profile-level-card-info{
    display:grid;
    gap:4px;
    min-width:0;
}

.profile-level-card-info strong{
    color:#fff;
    font-size:13px;
    overflow-wrap:anywhere;
}

.profile-level-card-info span{
    color:#aaa;
    font-size:11px;
    font-weight:800;
}

.center-col{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:0;
    position:relative;
}

/* INSTRUCTION */
.game-instruction{
    width:100%;
    margin:0 0 12px 0;
    padding:10px 14px;
    text-align:center;
    color:#f2f2f2;
    font-family:Arial,sans-serif;
    font-size:14px;
    line-height:1.25;
    background:rgba(0,0,0,.45);
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    text-shadow:0 2px 6px #000;
}

.bbn-instruction,
.fg-instruction{
    position:static!important;
    inset:auto!important;
    grid-column:auto!important;
    pointer-events:none;
}

/* GAME SQUARE */
.game-stage-square{
    width:min(90vw,78vh,1500px);
    max-width:1500px;
    aspect-ratio:1 / 1;
    position:relative;
    overflow:hidden;
    padding:12px;
    background:linear-gradient(135deg,#0d0d0d,#080808);
    border:1px solid #222;
    border-radius:20px;
    box-shadow:0 0 0 1px rgba(255,255,255,.02) inset;
}

.game-stage-content{
    width:100%;
    height:100%;
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns:22% 1fr 24%;
    gap:10px;
}

.stage-side,
.stage-main{
    min-height:0;
    display:flex;
}

.game-stage-square .sw-panel,
.game-stage-square .cord-panel,
.game-stage-square .wire-panel{
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    min-height:0;
    padding:10px;
}

/* PANEL */
.panel{
    background:#0e0e0e;
    border:1px solid #1e1e1e;
    border-radius:8px;
    padding:8px;
}

.panel-title{
    font-size:9px;
    color:#555;
    letter-spacing:2px;
    margin-bottom:7px;
    text-align:center;
}

/* LEADERBOARD */
.lb-panel{
    background:#0e0e0e;
    border:1px solid #1e1e1e;
    border-radius:8px;
    padding:10px;
    flex:1;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    margin-right:4px;
}

.lb-header{
    display:flex;
    justify-content:space-between;
    font-size:9px;
    color:#555;
    letter-spacing:2px;
    padding-bottom:5px;
    border-bottom:1px solid #1a1a1a;
    margin-bottom:5px;
    flex-shrink:0;
}

.lb-list{
    overflow-y:auto;
    flex:1;
    scrollbar-width:thin;
    scrollbar-color:#222 transparent;
}

.lb-loading,
.lb-empty{
    font-size:10px;
    color:#2a2a2a;
    text-align:center;
    padding:8px 0;
}

.lb-row{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 2px;
    border-bottom:1px solid #111;
}

.lb-row.lb-me{
    background:#140a0a;
    border-radius:3px;
    padding:6px 4px;
}

.lb-num{
    width:20px;
    font-size:14px;
    color:#444;
    font-family:'Courier New',monospace;
    flex-shrink:0;
    text-align:right;
}

.lb-num.gold{color:#d4a017}
.lb-num.silver{color:#8a8a8a}
.lb-num.bronze{color:#a0522d}

.lb-av{
    width:22px;
    height:22px;
    border-radius:50%;
    background:#1a2a1a;
    border:1px solid #253525;
    flex-shrink:0;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
}

.lb-av img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.lb-av-txt{
    font-size:10px;
    color:#5a8a5a;
    font-weight:700;
}

.lb-name{
    flex:1;
    font-size:15px;
    color:#ccc;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-weight:600;
}

.lb-time{
    font-size:14px;
    color:#66aaff;
    font-family:'Courier New',monospace;
    flex-shrink:0;
    font-weight:700;
}

.lb-my-row{
    flex-shrink:0;
    margin-top:5px;
    padding-top:4px;
    border-top:1px solid #1a1a1a;
}

.lb-my-inner{
    display:flex;
    align-items:center;
    gap:8px;
    background:#1a0808;
    border-radius:3px;
    padding:6px 4px;
}

.lb-my-lbl{
    font-size:9px;
    color:#3a3a3a;
    text-align:center;
    margin-top:2px;
}

/* PERSONAL */
.personal-panel{
    flex:1;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.right-personal-panel{
    min-height:180px;
    margin-left:4px;
}

.pp-user{
    font-size:15px;
    color:#8ce88c;
    text-align:center;
    padding:2px 0 6px;
    letter-spacing:1px;
    font-weight:700;
}

.pp-best{
    font-size:20px;
    font-family:'Courier New',monospace;
    color:#d4a017;
    text-align:center;
    padding:2px 0 6px;
    margin-bottom:4px;
    font-weight:700;
}

.pp-list{
    display:flex;
    flex-direction:column;
    gap:2px;
    overflow-y:auto;
    scrollbar-width:thin;
    scrollbar-color:#222 transparent;
}

.pp-row{
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:10px;
    align-items:center;
    padding:6px 2px;
    border-bottom:1px solid #0f0f0f;
    font-size:14px;
}

.pp-row span:first-child{color:#555}
.pp-row span:nth-child(2){
    color:#ccc;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-weight:600;
}
.pp-row span:last-child{
    color:#66aaff;
    font-family:'Courier New',monospace;
    font-weight:700;
}

.pp-empty,
.pp-login-hint{
    font-size:10px;
    color:#444;
    text-align:center;
    padding:8px 0;
}

/* BITE BY NIGHT */
.switches-grid{
    display:flex;
    flex-direction:column;
    gap:5px;
    width:100%;
    max-width:100%;
    min-width:0;
}

.sw-item{
    display:flex;
    align-items:center;
    gap:7px;
    width:100%;
    max-width:100%;
    min-width:0;
    cursor:pointer;
    padding:3px 4px;
    border-radius:4px;
    transition:background .15s;
}

.sw-item:hover{background:#141414}

.sw-led{
    width:13px;
    height:13px;
    border-radius:50%;
    background:#4a0000;
    border:1px solid #2a0000;
    flex-shrink:0;
    transition:all .2s;
}

.sw-item.on .sw-led{
    background:#22aa22;
    border-color:#157015;
    box-shadow:0 0 6px rgba(34,170,34,.5);
}

.sw-body{
    flex:1;
    min-width:0;
    background:#0a0a0a;
    border:1px solid #1e1e1e;
    border-radius:3px;
    padding:3px 6px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.sw-track{
    width:26px;
    height:14px;
    flex:0 0 auto;
    background:#060606;
    border:1px solid #252525;
    border-radius:7px;
    position:relative;
}

.sw-knob{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#2a2a2a;
    border:1px solid #3a3a3a;
    position:absolute;
    top:1px;
    left:1px;
    transition:left .15s,background .15s;
}

.sw-item.on .sw-knob{
    left:13px;
    background:#157015;
    border-color:#1f9a1f;
}

.sw-lbl{
    font-size:9px;
    color:#444;
    font-family:'Courier New',monospace;
    flex:0 0 auto;
}

.sw-item.on .sw-lbl{color:#22aa22}

.sw-hint{
    font-size:11px;
    color:#555;
    text-align:center;
    margin-top:6px;
    font-family:'Courier New',monospace;
}

.wire-panel{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    position:relative;
}

.wire-panel .panel-title{
    align-self:flex-start;
}

#wireCanvas{
    width:100%;
    height:100%;
    min-height:0;
    flex:1;
    display:block;
    position:relative;
    z-index:5;
    background:#050505;
    border:1px solid #171717;
    border-radius:10px;
    touch-action:none;
    cursor:grab;
}

.wire-panel::before{
    content:'';
    position:absolute;
    inset:10px;
    border-radius:10px;
    pointer-events:none;
    background:radial-gradient(circle at center,rgba(255,255,255,.03),transparent 70%);
    z-index:1;
}

.wire-hint{
    font-size:10px;
    color:#333;
    letter-spacing:1px;
    margin-top:6px;
    text-align:center;
}

.cord-panel{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
}

.cord-machine{
    display:flex;
    flex-direction:column;
    align-items:center;
}

.cord-engine-top{
    width:60px;
    height:30px;
    background:#141414;
    border:1px solid #252525;
    border-radius:5px 5px 0 0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
}

.cord-engine-slot{
    width:40px;
    height:5px;
    background:#0a0a0a;
    border:1px solid #1e1e1e;
    border-radius:3px;
}

.cord-drum-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
}

.cord-drum{
    width:30px;
    height:16px;
    background:#1e1e1e;
    border:1px solid #333;
    border-radius:50%;
    transition:transform .3s;
}

.cord-track-wrap{
    width:60px;
    background:#0d0d0d;
    border:1px solid #1e1e1e;
    border-top:none;
    border-radius:0 0 6px 6px;
    height:120px;
    position:relative;
}

.cord-track{
    width:100%;
    height:100%;
    position:relative;
}

.cord-rope{
    position:absolute;
    left:50%;
    top:0;
    transform:translateX(-50%);
    width:4px;
    background:linear-gradient(#444,#222);
    border-radius:2px;
    height:0;
    transition:height .05s;
}

.cord-handle{
    position:absolute;
    left:50%;
    top:0;
    transform:translateX(-50%);
    cursor:grab;
    user-select:none;
    touch-action:none;
}

.cord-handle-body{
    width:40px;
    height:22px;
    background:linear-gradient(135deg,#9a0000,#cc2222,#9a0000);
    border:1px solid #dd4444;
    border-radius:11px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    box-shadow:0 2px 6px rgba(0,0,0,.5);
}

.cord-handle-grip{
    width:22px;
    height:2px;
    background:rgba(255,255,255,.2);
    border-radius:1px;
}

.cord-progress-wrap{
    width:90px;
    height:8px;
    background:#060606;
    border:1px solid #1a1a1a;
    border-radius:4px;
    overflow:hidden;
}

.cord-progress-bar{
    height:100%;
    width:0;
    background:linear-gradient(90deg,#6a0000,#cc2222);
    border-radius:4px;
    transition:width .3s;
}

.cord-count{
    font-size:12px;
    color:#555;
    font-family:'Courier New',monospace;
    letter-spacing:1px;
}

.cord-hint{
    font-size:9px;
    color:#333;
    text-align:center;
    letter-spacing:1px;
}

/* STAGES */
.panel.stage-dim{
    opacity:.3;
    filter:grayscale(.5);
    pointer-events:none;
    transition:opacity .5s,filter .5s;
}

.panel.stage-active{
    opacity:1;
    filter:none;
    pointer-events:auto;
    transition:opacity .5s,filter .5s;
}

.panel.stage-done{
    opacity:.55;
    filter:grayscale(.3);
    pointer-events:none;
    transition:opacity .5s,filter .5s;
}

/* START */
.start-bar{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:20;
    background:rgba(5,5,5,.45);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.start-text{
    font-size:16px;
    color:#f2f2f2;
    letter-spacing:4px;
    cursor:pointer;
    animation:blink 1.6s infinite;
    display:inline-block;
    text-shadow:0 0 14px rgba(255,255,255,.28);
}

@keyframes blink{
    0%,100%{opacity:.28}
    50%{opacity:1}
}

/* FINISH */
.finish-overlay{
    position:absolute;
    inset:0;
    display:none;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:24px 24px 20px;
    overflow:hidden;
    z-index:30;
    background:rgba(3,8,3,.42);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.game-stage-square.is-finished .finish-overlay{
    display:flex;
}

.finish-glow{
    position:absolute;
    inset:0;
    background:radial-gradient(ellipse at center,rgba(34,170,34,.16) 0%,transparent 70%);
    pointer-events:none;
}

.finish-title{
    font-size:20px;
    font-weight:700;
    color:#6fff6f;
    letter-spacing:3px;
    text-align:center;
    position:relative;
    z-index:1;
}

.finish-time{
    font-size:40px;
    font-family:'Courier New',monospace;
    color:#f5fff3;
    letter-spacing:4px;
    text-align:center;
    text-shadow:0 0 12px rgba(34,170,34,.35);
    position:relative;
    z-index:1;
}

.finish-rank{
    font-size:12px;
    color:#b4f0b4;
    letter-spacing:2px;
    position:relative;
    z-index:1;
}

.restart-btn{
    background:#22aa22;
    border:1px solid #4fe44f;
    border-radius:8px;
    padding:11px 28px;
    font-size:12px;
    color:#fff;
    letter-spacing:2px;
    cursor:pointer;
    font-weight:700;
    transition:background .2s,transform .2s;
    z-index:1;
    margin-top:6px;
}

.restart-btn:hover{
    background:#2fbe2f;
    transform:translateY(-1px);
}

/* FORSAKEN */
.fg-game{
    width:100%;
    height:100%;
    position:relative;
    background:rgba(0,0,0,.72);
    border-radius:14px;
    padding:10px;
    overflow:hidden;
    display:grid;
    grid-template-columns:minmax(0,1fr) 42px;
    grid-template-rows:auto minmax(0,1fr) auto;
    gap:8px;
}

.fg-info{
    grid-column:1 / 3;
    display:flex;
    justify-content:space-between;
    color:#fff;
    font-size:18px;
    font-family:Arial,sans-serif;
    text-shadow:0 2px 5px #000;
}

.fg-board-wrap{
    position:relative;
    width:100%;
    max-width:100%;
    aspect-ratio:1 / 1;
    align-self:center;
    justify-self:center;
    background:#060606;
    border:4px solid #e6e6e6;
    overflow:hidden;
}

#fgSvg{
    position:absolute;
    inset:0;
    z-index:2;
    width:100%;
    height:100%;
    pointer-events:none;
}

.fg-board{
    position:absolute;
    inset:0;
    z-index:3;
    display:grid;
    grid-template-columns:repeat(6,1fr);
    grid-template-rows:repeat(6,1fr);
}

.fg-cell{
    position:relative;
    border-right:2px solid #171717;
    border-bottom:2px solid #171717;
    background:transparent;
    cursor:pointer;
    user-select:none;
    touch-action:none;
}

.fg-dot{
    position:absolute;
    z-index:10;
    width:62%;
    height:62%;
    left:19%;
    top:19%;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.fg-dot span{
    color:#fff;
    font-size:20px;
    font-weight:900;
    font-family:Arial,sans-serif;
    text-shadow:0 2px 6px #000;
}

.fg-side-bar{
    background:#070707;
    border:4px solid #e6e6e6;
    position:relative;
    overflow:hidden;
}

#fgProgressFill{
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
    height:0%;
    background:linear-gradient(to top,#e05050,#ff9a9a);
    transition:height .25s ease;
}

.fg-layer{
    grid-column:1 / 3;
    color:#ddd;
    text-align:center;
    font-size:15px;
}

.fg-start-overlay{
    position:absolute;
    inset:0;
    z-index:50;
    background:rgba(0,0,0,.55);
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.fg-start-title{
    color:#fff;
    font-size:38px;
    font-weight:900;
    letter-spacing:4px;
}

.fg-start-sub{
    color:#ddd;
    margin-top:10px;
    font-size:16px;
    letter-spacing:2px;
}

/* MOBILE */
@media (max-width:980px){
    html,body{
        min-height:100%;
        overflow-x:hidden;
        overflow-y:auto!important;
    }

    .navbar{
        height:auto;
        min-height:46px;
        padding:8px 12px;
        flex-wrap:wrap;
        gap:8px;
    }

    .auth-wrap{
        min-height:calc(100dvh - 46px);
        align-items:flex-start;
        padding:18px 12px 28px;
    }

    .auth-card{
        width:100%;
        max-width:360px;
        padding:22px 18px;
    }

    .register-wrap{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:16px;
        padding:18px 12px 80px;
    }

    .register-left{
        order:0;
        width:100%;
        max-width:420px;
        margin:0 auto;
        padding:16px;
    }

    .register-kicker{
        font-size:10px;
        text-align:center;
    }

    .register-title{
        font-size:25px;
        text-align:center;
    }

    .register-text{
        font-size:13px;
        text-align:center;
        margin-bottom:14px;
    }

    .register-showcase{
        order:1;
        width:100%;
        max-width:420px;
        margin:0 auto;
        display:flex;
        flex-direction:column;
        gap:12px;
    }

    .register-preview{
        order:0;
        min-height:0;
        border:0;
        border-radius:0;
        background:transparent;
    }

    .register-preview::before{
        left:0;
        right:0;
        top:22%;
        bottom:8%;
        filter:blur(18px);
    }

    .register-preview-head{
        grid-template-columns:38px 1fr 38px;
        min-height:48px;
        padding:7px 9px;
    }

    .register-preview-title{
        font-size:11px;
        letter-spacing:1.4px;
    }

    .register-preview-question{
        font-size:20px;
        padding:6px 10px 10px;
    }

    .register-arrow{
        width:34px;
        height:32px;
        font-size:22px;
    }

    .register-slides{
        min-height:270px;
    }

    .register-slide{
        padding:9px;
    }

    .register-character-panel{
        order:1;
        min-height:300px;
        border:0;
        border-radius:0;
        overflow:hidden;
    }

    .register-character-panel::before{
        left:2%;
        bottom:2%;
        width:86%;
        height:42%;
        filter:blur(22px);
    }

    .register-character-panel::after{
        left:-8%;
        right:-8%;
        width:auto;
        height:30%;
    }

    .register-character{
        object-position:18% center;
        transform:scale(1.12) translate(-2%, 7%);
    }

    .register-slogan{
        left:48%;
        top:22%;
        width:46%;
        font-size:17px;
        padding:0;
        margin:0;
        text-align:left;
    }

    .auth-main-btn{
        min-height:46px;
        font-size:12px;
    }

    .nav-name{
        max-width:130px;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    .generator-tabs{
        flex-wrap:wrap;
        padding:8px;
        gap:8px;
    }

    .generator-tab{
        flex:1 1 140px;
        text-align:center;
        padding:9px 12px;
    }

    .generator-page{
        height:auto!important;
        min-height:100vh!important;
        overflow:visible!important;
    }

    .game-page{
        height:auto!important;
        min-height:auto!important;
        overflow:visible!important;
        padding:8px!important;
    }

    .game-header{
        margin-bottom:10px;
    }

    .player-level-card-mobile{
        display:flex;
        width:100%;
        margin:0 0 10px;
        min-height:92px;
    }

    .left-col > .player-level-card{
        display:none;
    }

    .timer-display{
        font-size:20px!important;
        letter-spacing:3px!important;
    }

    .game-layout{
        display:flex!important;
        flex-direction:column!important;
        gap:16px!important;
        width:100%!important;
    }

    .center-col{
        order:1!important;
        width:100%!important;
        align-items:stretch!important;
        justify-content:flex-start!important;
        overflow:visible!important;
    }

    .right-col{
        order:2!important;
        width:100%!important;
        padding:0!important;
        overflow:visible!important;
    }

    .left-col{
        order:3!important;
        width:100%!important;
        padding:0!important;
        overflow:visible!important;
    }

    .game-instruction{
        margin-bottom:10px!important;
        font-size:12px!important;
        line-height:1.2!important;
    }

    .game-stage-square{
        width:100%!important;
        max-width:100%!important;
        height:auto!important;
        min-height:auto!important;
        aspect-ratio:auto!important;
        overflow:visible!important;
        padding:8px!important;
    }

    .game-stage-content{
        display:flex!important;
        flex-direction:column!important;
        height:auto!important;
        gap:10px!important;
    }

    .stage-main{
        order:1!important;
        width:100%!important;
    }

    .stage-side{
        width:100%!important;
    }

    .stage-side:first-child{
        order:2!important;
    }

    .stage-side:last-child{
        order:3!important;
    }

    .wire-panel,
    .sw-panel,
    .cord-panel{
        height:auto!important;
        min-height:220px!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    #wireCanvas{
        width:100%!important;
        height:260px!important;
        min-height:260px!important;
        flex:none!important;
    }

    .switches-grid{
        display:grid!important;
        grid-template-columns:repeat(5,1fr)!important;
        gap:7px!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    .sw-item{
        min-height:70px;
    }

    .cord-machine{
        min-height:220px;
    }

    .cord-track-wrap{
        height:155px;
    }

    .lb-panel,
    .personal-panel,
    .right-personal-panel{
        width:100%!important;
        max-height:none!important;
        min-height:auto!important;
        overflow:visible!important;
        margin:0!important;
    }

    .lb-list,
    .pp-list{
        max-height:none!important;
        overflow:visible!important;
    }

    .fg-game{
        width:100%!important;
        height:auto!important;
        min-height:auto!important;
        grid-template-columns:minmax(0,1fr) 32px!important;
        grid-template-rows:auto auto auto!important;
        padding:8px!important;
        gap:8px!important;
        overflow:hidden!important;
    }

    .fg-info{
        grid-column:1 / 3!important;
        font-size:13px!important;
    }

    .fg-board-wrap{
        width:min(100%,82vw)!important;
        max-width:100%!important;
        aspect-ratio:1 / 1!important;
        justify-self:center!important;
        align-self:center!important;
    }

    .fg-side-bar{
        width:32px!important;
        height:auto!important;
    }

    .fg-layer{
        grid-column:1 / 3!important;
    }

    .fg-dot{
        width:68%;
        height:68%;
        left:16%;
        top:16%;
    }

    .fg-dot span{
        font-size:13px!important;
    }

    .fg-start-title{
        font-size:32px;
    }

    .fg-start-sub{
        font-size:14px;
    }

    .vip-page{
        width:calc(100% - 20px);
        margin:16px auto 28px;
    }

    .vip-hero,
    .vip-buy-box{
        align-items:flex-start;
        flex-direction:column;
    }

    .vip-hero{
        padding:18px;
    }

    .vip-crown{
        width:62px;
        height:62px;
        font-size:34px;
    }

    .vip-hero h1{
        font-size:34px;
    }

    .vip-benefit-list{
        grid-template-columns:1fr;
    }

    .vip-buy-box button{
        width:100%;
    }

    .pvp-page{
        width:calc(100% - 20px);
        margin:14px auto 30px;
    }

    .pvp-shell{
        padding:12px;
    }

    .pvp-head,
    .pvp-actions{
        flex-direction:column;
    }

    .pvp-head h1{
        font-size:24px;
    }

    .pvp-generator-grid,
    .pvp-score,
    .pvp-round-results{
        grid-template-columns:1fr;
    }

    .pvp-game-frame-wrap{
        height:78vh;
        min-height:560px;
    }

    .pvp-search-btn,
    .pvp-ready-btn,
    .pvp-exit-btn,
    .pvp-cancel-btn{
        width:100%;
    }

    .pvp-duel-controls{
        grid-template-columns:1fr;
    }

    .pvp-top-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .pvp-top-row{
        grid-template-columns:42px minmax(0,1fr) auto;
    }

    .pvp-top-rank,
    .pvp-top-meta{
        grid-column:2 / -1;
    }

    .pvp-top-points{
        text-align:right;
    }

    .pvp-invite-toast{
        top:auto;
        right:10px;
        bottom:12px;
        width:calc(100vw - 20px);
    }

    .pvp-countdown{
        padding:14px;
    }

    .pvp-countdown-card{
        min-height:280px;
        padding:22px 16px;
    }

    .pvp-countdown span{
        font-size:14px;
    }

    .pvp-countdown strong{
        font-size:92px;
    }

    .pvp-countdown.mode-search strong,
    .pvp-countdown.mode-wait strong{
        font-size:48px;
    }

    .pvp-countdown.mode-found strong,
    .pvp-countdown.mode-victory strong{
        font-size:34px;
    }

    .pvp-countdown.mode-search .pvp-countdown-card::before{
        width:64px;
        height:64px;
    }

    .pvp-overlay-progress > div:first-child{
        flex-direction:column;
        align-items:center;
        gap:4px;
    }

    .pvp-overlay-btn{
        width:100%;
    }
}

@media (max-width:520px){
    .game-page{
        padding:6px!important;
    }

    .timer-display{
        font-size:18px!important;
    }

    .game-instruction{
        font-size:10px!important;
        padding:8px!important;
    }

    .fg-game{
        grid-template-columns:minmax(0,1fr) 26px!important;
        padding:7px!important;
    }

    .fg-board-wrap{
        width:min(100%,78vw)!important;
        border-width:3px!important;
    }

    .fg-info{
        font-size:11px!important;
    }

    .fg-dot span{
        font-size:11px!important;
    }

    .fg-start-title{
        font-size:26px;
        letter-spacing:2px;
    }

    .fg-start-sub{
        font-size:12px;
    }

    .vip-fg-board .fg-dot{
        width:76%;
        height:76%;
        left:12%;
        top:12%;
    }

    .vip-fg-board .fg-dot span{
        font-size:8px!important;
    }

    .vip-hero h1{
        font-size:30px;
    }

    #wireCanvas{
        height:220px!important;
        min-height:220px!important;
    }

    .wire-panel,
    .sw-panel,
    .cord-panel{
        min-height:190px!important;
        padding:10px!important;
    }

    .switches-grid{
        gap:5px!important;
    }

    .sw-item{
        min-height:58px;
        gap:6px!important;
        padding:7px 8px!important;
    }

    .sw-led{
        width:15px!important;
        height:15px!important;
        flex-basis:15px!important;
    }

    .sw-body{
        padding:7px 8px!important;
    }

    .sw-track{
        width:34px!important;
        height:18px!important;
        flex-basis:34px!important;
    }

    .sw-knob{
        width:12px!important;
        height:12px!important;
        top:2px!important;
        left:2px!important;
    }

    .sw-item.on .sw-knob{
        left:18px!important;
    }

    .sw-lbl{
        font-size:10px;
        min-width:24px!important;
    }

    .cord-track-wrap{
        height:135px;
    }

    .finish-title{
        font-size:16px;
    }

    .finish-time{
        font-size:26px;
    }

    .lb-name,
    .lb-time,
    .pp-row{
        font-size:12px;
    }
}
@media (max-width:980px){
    .sw-panel {
        min-height: 280px !important;
        overflow-x: hidden !important;
        align-items: stretch !important;
    }

    .switches-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .sw-item {
        min-height: 46px !important;
        padding: 8px 10px !important;
        background: #101010;
        border: 1px solid #202020;
        border-radius: 8px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .sw-led {
        width: 18px !important;
        height: 18px !important;
        flex: 0 0 18px !important;
    }

    .sw-body {
        padding: 8px 10px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .sw-track {
        width: 42px !important;
        height: 22px !important;
        flex: 0 0 42px !important;
    }

    .sw-knob {
        width: 16px !important;
        height: 16px !important;
        top: 2px !important;
        left: 2px !important;
    }

    .sw-item.on .sw-knob {
        left: 21px !important;
    }

    .sw-lbl {
        font-size: 13px !important;
        min-width: 30px !important;
        text-align: right !important;
    }

    .cord-track,
    .cord-handle,
    .cord-panel {
        touch-action: none !important;
        overscroll-behavior: contain !important;
    }
}

@media (max-width:520px){
    .sw-panel{
        min-height:240px!important;
        padding:8px!important;
    }

    .switches-grid{
        gap:7px!important;
    }

    .sw-item{
        min-height:42px!important;
        gap:6px!important;
        padding:7px 8px!important;
    }

    .sw-led{
        width:15px!important;
        height:15px!important;
        flex:0 0 15px!important;
    }

    .sw-body{
        padding:7px 8px!important;
        min-width:0!important;
    }

    .sw-track{
        width:34px!important;
        height:18px!important;
        flex:0 0 34px!important;
    }

    .sw-knob{
        width:12px!important;
        height:12px!important;
        top:2px!important;
        left:2px!important;
    }

    .sw-item.on .sw-knob{
        left:18px!important;
    }

    .sw-lbl{
        min-width:24px!important;
        font-size:10px!important;
    }
}

@media (max-width:980px){
    .nav-right{
        gap:6px;
    }

    .nav-brand{
        gap:7px;
    }

    .online-badge{
        min-height:22px;
        padding:0 7px;
        gap:5px;
        font-size:9px;
        letter-spacing:.3px;
    }

    .online-dot{
        width:6px;
        height:6px;
    }

    .nav-name{
        display:none;
    }

    .nav-btn{
        padding:5px 7px;
        font-size:9px;
        letter-spacing:.5px;
    }

    .profile-page{
        width:calc(100% - 20px);
        margin-top:14px;
    }

    .profile-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .profile-back-btn{
        grid-column:1 / -1;
    }

    .profile-actions a,
    .profile-back-btn{
        width:100%;
        min-height:38px;
    }

    .profile-hero{
        align-items:stretch;
        flex-direction:column;
        padding:14px;
    }

    .profile-main{
        align-items:flex-start;
    }

    .profile-avatar{
        width:62px;
        height:62px;
    }

    .profile-title-block h1{
        font-size:24px;
    }

    .profile-username-form{
        width:100%;
        grid-template-columns:1fr;
    }

    .profile-username-form button{
        width:100%;
    }

    .profile-sound-settings{
        width:150px;
    }

    .profile-level-card{
        width:100%;
    }

    .profile-level-row,
    .profile-xp{
        width:100%;
    }

    .profile-rank{
        width:100%;
    }

    .profile-stats{
        grid-template-columns:repeat(2,1fr);
    }

    .profile-achievements-grid{
        grid-template-columns:1fr;
    }

    .achievement-toast-host{
        left:10px;
        top:58px;
    }

    .achievement-toast{
        width:calc(100vw - 20px);
    }

    .profile-modal{
        padding:10px;
        align-items:flex-end;
    }

    .profile-modal-card{
        width:100%;
        max-height:calc(100dvh - 20px);
        padding:15px;
    }

    .profile-modal-head{
        align-items:flex-start;
    }

    .profile-modal-avatar{
        width:58px;
        height:58px;
    }

    .profile-modal-head h2{
        font-size:21px;
    }

    .profile-modal-stats{
        grid-template-columns:repeat(2,1fr);
    }

    .sound-control{
        right:8px;
        bottom:8px;
    }

    .sound-float-btn{
        min-width:54px;
        height:30px;
        padding:0 8px;
        font-size:9px;
    }

    .sound-float-panel{
        width:min(188px,calc(100vw - 18px));
    }

    .player-level-card{
        overflow:visible;
    }

    .player-level-tip{
        left:10px;
        right:10px;
        top:calc(100% + 10px);
        width:auto;
    }

    .player-level-tip::before{
        left:33px;
        top:-7px;
        border-left:1px solid #3a2424;
        border-bottom:0;
        border-top:1px solid #3a2424;
    }
}

@media (min-width:981px) and (max-width:1180px){
    .profile-stats{
        grid-template-columns:repeat(3,1fr);
    }

    .profile-achievements-grid{
        grid-template-columns:repeat(2,1fr);
    }
}
