/* Checkers Duel Arena MOTD — compatible with the old Counter-Strike browser */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    width: 100%;
    height: 100%;
    background: #09090b;
}

body {
    width: 100%;
    min-height: 100%;
    padding: 14px 2%;
    overflow-x: hidden;
    color: #f3ebd8;
    font: 500 13px/1.2 Tahoma, Arial, sans-serif;
    background-color: #09090b;
    background-image: url("anast_checkers.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    background-attachment: fixed;
}

@keyframes backgroundDrift {
    0% { background-position: 47% center; }
    100% { background-position: 53% center; }
}

@keyframes goldOrbit {
    0% { left: -250px; top: -125px; opacity: .68; }
    100% { left: -185px; top: -55px; opacity: 1; }
}
@keyframes redOrbit {
    0% { right: -245px; bottom: -155px; opacity: .65; }
    100% { right: -175px; bottom: -80px; opacity: 1; }
}

h1, h2 {
    position: relative;
    z-index: 2;
    width: 96%;
    margin: 0 auto 10px;
    padding: 7px 0 10px;
    color: #fff8e7;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 5px #fff, 0 0 12px #f59e0b, 0 0 28px #dc2626;
    animation: titleGlow 3s ease-in-out infinite;
}
h1:after, h2:after {
    content: "";
    display: block;
    width: 42%;
    height: 2px;
    margin: 8px auto 0;
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b, 0 0 20px #dc2626;
    animation: titleLine 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { color: #fff8e7; text-shadow: 0 0 5px #fff, 0 0 12px #f59e0b, 0 0 28px #b8860b; }
    50% { color: #ffffff; text-shadow: 0 0 7px #fff, 0 0 16px #ef4444, 0 0 34px #991b1b; }
}
@keyframes titleLine {
    0%, 100% { width: 35%; background: #f59e0b; box-shadow: 0 0 8px #f59e0b, 0 0 20px #b8860b; }
    50% { width: 58%; background: #ef4444; box-shadow: 0 0 9px #ef4444, 0 0 24px #991b1b; }
}

table {
    position: relative;
    z-index: 2;
    width: 96% !important;
    max-width: 1400px;
    margin: 0 auto;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    color: #f3ebd8;
    background-color: rgba(14, 12, 12, 0.93);
    background: linear-gradient(135deg, rgba(22, 16, 16, 0.95), rgba(12, 10, 14, 0.93));
    border: 1px solid #f59e0b;
    border-radius: 13px;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.8), 0 0 25px rgba(220, 38, 38, 0.25),
                0 18px 40px rgba(0, 0, 0, 0.85);
    animation: panelGlow 4s ease-in-out infinite;
}

@keyframes panelGlow {
    0%, 100% { border-color: #f59e0b; box-shadow: 0 0 8px #f59e0b, 0 0 28px rgba(245, 158, 11, 0.35), 0 18px 40px rgba(0,0,0,.85); }
    50% { border-color: #ef4444; box-shadow: 0 0 10px #ef4444, 0 0 32px rgba(239, 68, 68, 0.4), 0 18px 40px rgba(0,0,0,.85); }
}

th {
    height: 40px;
    padding: 5px;
    overflow: hidden;
    color: #fff3d1;
    font-size: 10px;
    font-weight: bold;
    line-height: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: normal;
    background-color: #241414;
    background: linear-gradient(90deg, #2b1414, #4a1515, #1f1418, #2b1414);
    background-size: 300% 100%;
    border-bottom: 2px solid #f59e0b;
    text-shadow: 0 0 7px #f59e0b;
    animation: headerFlow 7s linear infinite;
}

@keyframes headerFlow {
    0% { background-position: 0 0; }
    100% { background-position: 300% 0; }
}
th + th { border-left: 1px solid rgba(245, 158, 11, 0.2); }

tr { background-color: rgba(18, 14, 15, 0.93); }
tbody tr:nth-child(even), tr#b, tr.b { background-color: rgba(26, 18, 20, 0.95); }
tbody tr:hover {
    background-color: rgba(60, 25, 25, 0.78);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.22), rgba(220, 38, 38, 0.28), rgba(245, 158, 11, 0.15));
    box-shadow: 4px 0 0 #ef4444 inset, 0 0 25px rgba(239, 68, 68, 0.25) inset;
}

tbody tr:hover td:first-child {
    color: #ffffff;
    text-shadow: 0 0 8px #ef4444, 0 0 18px #f59e0b;
}

/* TOP 3 — PODIUM BANDS (Duel Edition) */
body > table > tbody > tr:nth-child(2) td {
    background-color: rgba(110, 75, 8, .78);
    border-top: 1px solid rgba(255, 225, 105, .70);
    border-bottom: 1px solid rgba(255, 190, 35, .65);
    animation: podiumGold 2.4s ease-in-out infinite;
}

body > table > tbody > tr:nth-child(3) td {
    background-color: rgba(50, 58, 66, .82);
    border-top: 1px solid rgba(230, 240, 250, .70);
    border-bottom: 1px solid rgba(160, 175, 190, .60);
    animation: podiumSilver 2.7s ease-in-out infinite;
}

body > table > tbody > tr:nth-child(4) td {
    background-color: rgba(95, 30, 20, .85);
    border-top: 1px solid rgba(255, 130, 113, .63);
    border-bottom: 1px solid rgba(239, 68, 68, .65);
    animation: podiumBronze 3s ease-in-out infinite;
}

body > table > tbody > tr:nth-child(2) td:first-child { border-left: 3px solid #ffe26a; }
body > table > tbody > tr:nth-child(2) td:last-child  { border-right: 3px solid #ffe26a; }
body > table > tbody > tr:nth-child(3) td:first-child { border-left: 3px solid #e0ebf5; }
body > table > tbody > tr:nth-child(3) td:last-child  { border-right: 3px solid #e0ebf5; }
body > table > tbody > tr:nth-child(4) td:first-child { border-left: 3px solid #ef4444; }
body > table > tbody > tr:nth-child(4) td:last-child  { border-right: 3px solid #ef4444; }

body > table > tbody > tr:nth-child(2) td:first-child,
body > table > tbody > tr:nth-child(2) td:nth-child(2) {
    color: #fff2a5;
    text-shadow: 0 0 4px #fff, 0 0 9px #ffd12e, 0 0 17px #ff9900;
}
body > table > tbody > tr:nth-child(3) td:first-child,
body > table > tbody > tr:nth-child(3) td:nth-child(2) {
    color: #ffffff;
    text-shadow: 0 0 4px #fff, 0 0 9px #d0e0f0, 0 0 16px #90a0b0;
}
body > table > tbody > tr:nth-child(4) td:first-child,
body > table > tbody > tr:nth-child(4) td:nth-child(2) {
    color: #ffccd0;
    text-shadow: 0 0 4px #fff, 0 0 9px #ef4444, 0 0 16px #991b1b;
}

/* --- ИКОНКИ PNG ДЛЯ ТОП-3 --- */
body > table > tbody > tr:nth-child(2) > td:nth-child(2) {
    background-image: url("ch-1.png");
    background-position: 155% 50%;
    background-repeat: no-repeat;
    background-size: 185px;
    padding-right: 40px;
}
body > table > tbody > tr:nth-child(3) > td:nth-child(2) {
    background-image: url("ch-2.png");
    background-position: 155% 50%;
    background-repeat: no-repeat;
    background-size: 185px;
    padding-right: 40px;
}
body > table > tbody > tr:nth-child(4) > td:nth-child(2) {
    background-image: url("ch-3.png");
    background-position: 155% 50%;
    background-repeat: no-repeat;
    background-size: 185px;
    padding-right: 40px;
}

@keyframes podiumGold {
    0%, 100% { background-color: rgba(95, 65, 8, .74); box-shadow: 0 5px 17px rgba(255, 183, 24, .13) inset; }
    50% { background-color: rgba(135, 95, 12, .88); box-shadow: 0 0 25px rgba(255, 211, 69, .35) inset; }
}
@keyframes podiumSilver {
    0%, 100% { background-color: rgba(45, 52, 60, .78); box-shadow: 0 5px 15px rgba(200, 215, 230, .11) inset; }
    50% { background-color: rgba(70, 80, 92, .91); box-shadow: 0 0 23px rgba(220, 235, 250, .29) inset; }
}
@keyframes podiumBronze {
    0%, 100% { background-color: rgba(90, 28, 18, .78); box-shadow: 0 5px 15px rgba(239, 68, 68, .15) inset; }
    50% { background-color: rgba(130, 40, 25, .91); box-shadow: 0 0 22px rgba(239, 68, 68, .35) inset; }
}

td {
    height: 36px;
    min-width: 0;
    padding: 4px 6px;
    overflow: hidden;
    color: #e5dac6;
    font-size: 14px;
    font-weight: bold;
    line-height: 14px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
    text-shadow: 0 1px 2px #000;
}
tbody tr:last-child td { border-bottom: 0; }

th:first-child, td:first-child { width: 5%; }
td:first-child {
    color: #f59e0b;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 0 7px #f59e0b, 0 0 14px #991b1b;
}

th:nth-child(2), td:nth-child(2) { width: 32%; }
td:nth-child(2) {
    color: #f7ebd3;
    font-weight: bold;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    text-shadow: 0 0 5px rgba(245, 158, 11, 0.45), 0 1px 2px #000;
}

body > table > tbody > tr:nth-child(2) td:nth-child(2) {
    color: #fffbd2;
    text-shadow: 0 0 4px #fff, 0 0 9px #ffd12e, 0 0 17px #ff9900;
}
body > table > tbody > tr:nth-child(3) td:nth-child(2) {
    color: #ffffff;
    text-shadow: 0 0 4px #fff, 0 0 9px #c8d8e8, 0 0 16px #788898;
}
body > table > tbody > tr:nth-child(4) td:nth-child(2) {
    color: #ffd8d8;
    text-shadow: 0 0 4px #fff, 0 0 9px #ef4444, 0 0 16px #991b1b;
}

p {
    position: relative;
    z-index: 2;
    width: 92%;
    margin: 0 auto 7px;
    color: #ebdcb9;
    font-size: 12px;
    text-align: left;
    text-shadow: 0 0 7px rgba(245, 158, 11, 0.5);
}

table[cellspacing="10"] {
    width: 92% !important;
    margin: 0 auto;
    table-layout: fixed;
    border-spacing: 8px;
    background-color: rgba(15, 12, 12, 0.88);
}

table[cellspacing="10"] > tbody > tr > td {
    height: auto;
    padding: 0;
    vertical-align: top;
    border: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
}

table[cellspacing="10"] > tbody > tr > td:first-child { width: 22% !important; }
table[cellspacing="10"] > tbody > tr > td:nth-child(2) { width: 78% !important; }

table[cellspacing="10"] table {
    width: 100% !important;
    max-width: none;
    margin: 0;
    table-layout: auto;
    border-radius: 8px;
    animation: none;
}

table[cellspacing="10"] table th {
    width: auto;
    height: 31px;
    padding: 4px 5px;
    font-size: 9px;
    line-height: 10px;
}

table[cellspacing="10"] table td {
    width: auto;
    height: 29px;
    padding: 3px 5px;
    font-size: 10px;
    line-height: 11px;
    text-align: center;
    word-break: normal;
    animation: none;
}

table[cellspacing="10"] > tbody > tr > td:first-child table td:first-child {
    width: 67%;
    color: #f59e0b;
    text-align: left;
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.55);
}

table[cellspacing="10"] > tbody > tr > td:first-child table td:nth-child(2) {
    width: 33%;
    color: #fff;
    text-align: center;
}

table[cellspacing="10"] > tbody > tr > td:nth-child(2) table th:first-child,
table[cellspacing="10"] > tbody > tr > td:nth-child(2) table td:first-child {
    width: 19%;
    text-align: left;
}

.player-cell { display: block; width: 100%; min-height: 24px; }
.player-avatar {
    float: left;
    width: 24px;
    height: 24px;
    margin-right: 7px;
    border: 1px solid #f59e0b;
    border-radius: 5px;
    box-shadow: 0 0 9px rgba(245, 158, 11, 0.6);
}
.player-name {
    display: block;
    padding-top: 5px;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
}

.q, #q { background: rgba(245, 158, 11, 0.12); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3) inset; }
.iN { color: #ef4444; font-weight: bold; text-shadow: 0 0 9px #991b1b; }
.iY { color: #34d399; font-weight: bold; text-shadow: 0 0 9px #059669; }

/* Rank Capsules */
#Lm, #L, #Lp, #Mm, #M, #Mp, #Hm, #H, #Hp, #Pm, #P, #Pp, #G {
    position: relative;
    display: inline-block;
    min-width: 54px;
    height: 25px;
    padding: 0 7px 0 22px;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 23px;
    vertical-align: middle;
    border: 1px solid #a89f91;
    border-radius: 13px;
    background-color: #201a18;
    box-shadow: 0 0 9px rgba(168, 159, 145, 0.5);
    text-shadow: 0 0 6px #fff;
}

#Lm:before, #L:before, #Lp:before, #Mm:before, #M:before, #Mp:before,
#Hm:before, #H:before, #Hp:before, #Pm:before, #P:before, #Pp:before, #G:before {
    content: "";
    position: absolute;
    left: 7px;
    top: 7px;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #a89f91;
    box-shadow: 0 0 8px #a89f91;
}

#Lm, #L, #Lp { border-color: #f97316; background: linear-gradient(90deg,#522017,#1b1113); box-shadow: 0 0 10px rgba(249,115,22,.72); }
#Lm:before, #L:before, #Lp:before { background: #f97316; box-shadow: 0 0 9px #ea580c; }
#Mm, #M, #Mp { border-color: #d8c29d; background: linear-gradient(90deg,#423525,#1c1712); box-shadow: 0 0 10px rgba(216,194,157,.74); }
#Mm:before, #M:before, #Mp:before { background: #d8c29d; box-shadow: 0 0 9px #bfa275; }
#Hm, #H, #Hp { border-color: #facc15; background: linear-gradient(90deg,#574617,#21170b); box-shadow: 0 0 11px rgba(250,204,21,.80); }
#Hm:before, #H:before, #Hp:before { background: #facc15; box-shadow: 0 0 9px #eab308; }
#Pm, #P, #Pp { border-color: #ef4444; background: linear-gradient(90deg,#5e1c1c,#210d0d); box-shadow: 0 0 11px rgba(239,68,68,.82); }
#Pm:before, #P:before, #Pp:before { background: #ef4444; box-shadow: 0 0 9px #dc2626; }
#G {
    border-color: #f59e0b;
    background: linear-gradient(90deg,#654a1f,#281c10);
    box-shadow: 0 0 10px #f59e0b, 0 0 23px rgba(245,158,11,.68);
    animation: godPulse 2s ease-in-out infinite;
}
#G:before { background: #fef08a; box-shadow: 0 0 9px #f59e0b, 0 0 16px #f59e0b; }

@keyframes godPulse {
    0%, 100% { box-shadow: 0 0 9px #f59e0b, 0 0 19px rgba(245,158,11,.55); }
    50% { box-shadow: 0 0 15px #fef08a, 0 0 31px rgba(245,158,11,.88); }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0c0a0a; }
::-webkit-scrollbar-thumb { border-radius: 6px; background: linear-gradient(180deg,#f59e0b,#dc2626,#991b1b); }

/* Compact mode / Responsive */
@media screen and (max-height: 420px) {
    body { padding: 5px 1%; background-position: center center; }
    table, h1, h2 { width: 96% !important; margin-left: auto; margin-right: auto; }
    h1, h2 { margin-bottom: 5px; padding: 4px 0 6px; font-size: 15px; letter-spacing: 2px; }
    h1:after, h2:after { margin-top: 4px; }
    th { height: 28px; padding: 2px 3px; font-size: 8px; line-height: 10px; letter-spacing: 0; }
    td { height: 27px; padding: 2px 4px; font-size: 10px; line-height: 11px; }
    td:first-child { font-size: 13px; }
    td:nth-child(2) { font-size: 10px; }
    .player-cell { min-height: 20px; }
    .player-avatar { width: 20px; height: 20px; margin-right: 5px; }
    .player-name { padding-top: 4px; }
    #Lm, #L, #Lp, #Mm, #M, #Mp, #Hm, #H, #Hp, #Pm, #P, #Pp, #G {
        min-width: 44px; height: 21px; padding: 0 5px 0 18px; font-size: 9px; line-height: 19px;
    }
    #Lm:before, #L:before, #Lp:before, #Mm:before, #M:before, #Mp:before,
    #Hm:before, #H:before, #Hp:before, #Pm:before, #P:before, #Pp:before, #G:before {
        left: 6px; top: 6px; width: 7px; height: 7px; border-width: 1px;
    }
}

@media screen and (max-width: 760px) {
    body { padding: 3px 1%; }
    table, h1, h2 { width: 98% !important; }
    h1, h2 { margin-bottom: 3px; padding: 3px 0 4px; font-size: 13px; letter-spacing: 1px; }
    th { height: 25px; padding: 2px; font-size: 7px; line-height: 9px; letter-spacing: 0; }
    td { height: 24px; padding: 1px 2px; font-size: 9px; line-height: 10px; }
    th:first-child, td:first-child { width: 6%; }
    th:nth-child(2), td:nth-child(2) { width: 35%; }
    #Lm, #L, #Lp, #Mm, #M, #Mp, #Hm, #H, #Hp, #Pm, #P, #Pp, #G {
        min-width: 39px; height: 19px; padding: 0 3px 0 15px; font-size: 8px; line-height: 17px;
    }
}

@media screen and (max-height: 360px) {
    body { padding: 2px 1%; }
    h1, h2 { margin-bottom: 2px; padding: 2px 0 3px; font-size: 12px; }
    h1:after, h2:after { margin-top: 2px; }
    th { height: 23px; padding: 1px 2px; font-size: 7px; line-height: 8px; }
    td { height: 22px; padding: 1px 3px; font-size: 9px; line-height: 10px; }
    td:first-child { font-size: 11px; }
    td:nth-child(2) { font-size: 9px; }
    #Lm, #L, #Lp, #Mm, #M, #Mp, #Hm, #H, #Hp, #Pm, #P, #Pp, #G {
        min-width: 39px; height: 18px; padding-left: 15px; font-size: 8px; line-height: 16px;
    }
}

/* ==========================================
   ИКОНКИ СТАТИСТИКИ (ПОБЕДЫ, ПОРАЖЕНИЯ, СКИЛЛ)
   ========================================== */
th:nth-child(3)::before, 
th:nth-child(4)::before, 
th:nth-child(5)::before {
    content: "" !important;
    display: inline-block !important;
    width: 25px !important;
    height: 25px !important;
    margin-right: 6px !important;
    vertical-align: middle !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

th:nth-child(3)::before {
    background-image: url('win_ch.png') !important;
}

th:nth-child(4)::before {
    background-image: url('game_over_ch.png') !important;
}

th:nth-child(5)::before {
    background-image: url('skill_ch.png') !important;
}