/* Основни стилове */
body {
    margin: 0;
    padding: 10px;
    background: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/bg-qgs.jpg) no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    min-height: auto;
    overflow: hidden;
}

/* Заглавие */
h2 {
    color: #00ccff;
    text-align: center;
    text-transform: uppercase;
    margin: 5px 0;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
    letter-spacing: 2px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(0, 204, 255, 0) 0%,
        rgba(0, 204, 255, 0.8) 50%,
        rgba(0, 204, 255, 0) 100%
    );
}

/* Параграфи */
p {
    text-align: center;
    color: #8a8d91;
    margin: 4px 0;
    font-size: 11px;
}

/* Таблица */
table {
    width: 98%;
    max-width: 800px;
    margin: 5px auto;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(13, 17, 23, 0.95);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 204, 255, 0.1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

table::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg,
        rgba(0, 204, 255, 0) 0%,
        rgba(0, 204, 255, 0.03) 50%,
        rgba(0, 204, 255, 0) 100%
    );
    mask: linear-gradient(#fff 0 0) content-box,
          linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    animation: borderGlow 6s linear infinite;
}

/* Хедър на таблицата */
th {
    background: rgba(10, 14, 18, 0.98);
    color: #00ccff;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 204, 255, 0.1);
    position: relative;
    overflow: hidden;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(0, 204, 255, 0) 0%,
        rgba(0, 204, 255, 0.5) 50%,
        rgba(0, 204, 255, 0) 100%
    );
}

/* Редове */
tr {
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 204, 255, 0.03);
}

tr:hover {
    background: rgba(0, 204, 255, 0.03);
    transform: translateZ(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Клетки */
td {
    padding: 3px 2px;
    font-size: 11px;
    border-bottom: 1px solid rgba(28, 30, 39, 0.8);
    color: #8a8d91;
}

/* Чередуващи се редове */
tr:nth-child(even) {
    background: rgba(20, 22, 29, 0.4);
}

/* Позиция (#) */
td:first-child {
    font-weight: bold;
    color: #00ccff;
    width: 25px;
    text-align: center;
    font-size: 12px;
}

/* Име на играч */
td:nth-child(2) {
    color: #ffffff;
    font-weight: 500;
    padding-left: 4px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Статистики */
td:not(:first-child):not(:nth-child(2)) {
    text-align: center;
    padding: 3px 2px;
}

/* Топ 3 играчи с градиенти */
tr:nth-child(2) {
    background: linear-gradient(90deg,
        rgba(255, 215, 0, 0.08) 0%,
        rgba(255, 215, 0, 0.12) 50%,
        rgba(255, 215, 0, 0.03) 100%
    );
}

tr:nth-child(2) td {
    color: #ffd700 !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

tr:nth-child(3) {
    background: linear-gradient(90deg,
        rgba(192, 192, 192, 0.08) 0%,
        rgba(192, 192, 192, 0.12) 50%,
        rgba(192, 192, 192, 0.03) 100%
    );
}

tr:nth-child(3) td {
    color: #c0c0c0 !important;
    text-shadow: 0 0 5px rgba(192, 192, 192, 0.3);
}

tr:nth-child(4) {
    background: linear-gradient(90deg,
        rgba(205, 127, 50, 0.08) 0%,
        rgba(205, 127, 50, 0.12) 50%,
        rgba(205, 127, 50, 0.03) 100%
    );
}

tr:nth-child(4) td {
    color: #cd7f32 !important;
    text-shadow: 0 0 5px rgba(205, 127, 50, 0.3);
}

/* Специални стойности */
.iN {
    color: #ff3366;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 51, 102, 0.3);
}

.iY {
    color: #33ff99;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(51, 255, 153, 0.3);
}

/* Иконки в заглавията */
th:nth-child(2)::before,
th:nth-child(3)::before,
th:nth-child(4)::before,
th:nth-child(5)::before,
th:nth-child(6)::before,
th:nth-child(7)::before {
    margin-right: 4px;
    opacity: 0.9;
    display: inline-block;
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

th:hover::before {
    transform: translateY(-1px) scale(1.1);
}

/* Специфични иконки за заглавия */
th:nth-child(2)::before { content: "☺"; color: #00ccff; }
th:nth-child(3)::before { content: "†"; color: #ff3366; }
th:nth-child(4)::before { content: "☠"; color: #8a8d91; }
th:nth-child(5)::before { content: "◎"; color: #ffd700; }
th:nth-child(6)::before { content: "∿"; color: #33ff99; }
th:nth-child(7)::before { content: "★"; color: #00ccff; }

/* Специфични иконки за клетки */
td:nth-child(2)::before { content: "☺"; color: #00ccff; }
td:nth-child(3)::before { content: "†"; color: #ff3366; }
td:nth-child(4)::before { content: "☠"; color: #8a8d91; }
td:nth-child(5)::before { content: "◎"; color: #ffd700; }
td:nth-child(6)::before { content: "∿"; color: #33ff99; }
td:nth-child(7)::before { content: "★"; color: #00ccff; }

/* Медали за топ 3 */
tr:nth-child(2) td:first-child { 
    background: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/1.png) center no-repeat;
    background-size: 16px;
    position: relative;
    padding-right: 20px;
}

tr:nth-child(3) td:first-child { 
    background: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/2.png) center no-repeat;
    background-size: 16px;
    position: relative;
    padding-right: 20px;
}

tr:nth-child(4) td:first-child { 
    background: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/3.png) center no-repeat;
    background-size: 16px;
    position: relative;
    padding-right: 20px;
}

/* Стилове за топ 3 играчи */
tr:nth-child(2) td {
    color: #ffd700 !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

tr:nth-child(3) td {
    color: #c0c0c0 !important;
    text-shadow: 0 0 5px rgba(192, 192, 192, 0.3);
}

tr:nth-child(4) td {
    color: #cd7f32 !important;
    text-shadow: 0 0 5px rgba(205, 127, 50, 0.3);
}

/* Ранк изображения */
#Lm { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/1.png); }  /* Rank 1 */
#L { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/2.png); }   /* Rank 2 */
#Lp { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/3.png); }  /* Rank 3 */
#Mm { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/4.png); }  /* Rank 4 */
#M { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/5.png); }   /* Rank 5 */
#Mp { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/6.png); }  /* Rank 6 */
#Hm { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/7.png); }  /* Rank 7 */
#H { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/8.png); }   /* Rank 8 */
#Hp { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/9.png); }  /* Rank 9 */
#Pm { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/10.png); } /* Rank 10 */
#P { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/11.png); }  /* Rank 11 */
#Pp { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/12.png); } /* Rank 12 */
#G { background-image: url(http://fastdl-c01.gameserver.center/modes/aesstats/img/ranksnew/13.png); }  /* Rank 13 */

/* Общи стилове за ранк изображения */
#Lm, #L, #Lp, #Mm, #M, #Mp, #Hm, #H, #Hp, #Pm, #P, #Pp, #G {
    height: 20px;
    width: 20px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin: 0 2px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(0, 204, 255, 0.3));
}

/* Hover ефект за ранк изображения */
#Lm:hover, #L:hover, #Lp:hover, #Mm:hover, #M:hover, #Mp:hover,
#Hm:hover, #H:hover, #Hp:hover, #Pm:hover, #P:hover, #Pp:hover, #G:hover {
    transform: scale(1.2) translateY(-2px);
    filter: drop-shadow(0 0 5px rgba(0, 204, 255, 0.6));
}

/* Допълнителни стилове */
.info {
    background: rgba(0, 204, 255, 0.05);
    padding: 5px;
    border-radius: 4px;
    margin: 5px 0;
    text-align: center;
    font-size: 10px;
    border: 1px solid rgba(0, 204, 255, 0.1);
}

.commands {
    text-align: center;
    color: #8a8d91;
    margin: 4px 0;
    font-size: 10px;
    opacity: 0.8;
}

/* Анимации */
@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translateZ(0);
    }
    50% {
        opacity: 1;
        transform: translateZ(10px);
    }
}

@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Медиа запитвания */
@media screen and (max-width: 800px) {
    body { padding: 2px; }
    table { margin: 2px 0; }
    td, th { padding: 2px 1px; }
    td:first-child { width: 20px; }
    td:nth-child(2) { max-width: 100px; }
}
