/* Общие настройки*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: radial-gradient(circle, rgba(36, 11, 54, 1) 0%, rgba(10, 5, 18, 1) 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
}

.container {
    max-width: 1400px;
    /* Немного увеличил, чтобы влезло три колонки */
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Шапка */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;

    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 7, 26, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
}

.logo-area {
    display: flex;
    align-items: flex-end;
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
}

.logo-svg {
    width: 55px;
    filter: drop-shadow(0 0 12px rgba(142, 68, 173, 0.8));
    transition: 0.3s;
}

.logo-area:hover .logo-svg {
    filter: drop-shadow(0 0 15px rgba(142, 68, 173, 1));
}

nav {
    display: flex;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    transition: 0.3s;
}

nav a:hover {
    color: #fff;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #8e44ad;
}

.steam-login {
    font-weight: 700;
    padding: 10px 25px;
    border: 2px solid #8e44ad;
    border-radius: 30px;
    color: #8e44ad;
    text-decoration: none;
    text-transform: uppercase;
    transition: 0.3s;
}

.steam-login:hover {
    background: #8e44ad;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 0 20px rgba(142, 68, 173, 0.7);
}

.layout-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.content-left {
    flex: 2.5;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-right {
    flex: 1;
    position: sticky;
    top: 120px;
}

.card {
    background: rgba(20, 10, 35, 0.6);
    border: 1px solid rgba(142, 68, 173, 0.2);
    border-radius: 20px;
    padding: 30px;
    transition: 0.3s;
    min-height: 330px;
}


.card:hover {
    background: rgba(21, 10, 38, 0.65);
    border-color: rgba(142, 68, 173, 0.4);
}

.card h2 {
    margin-bottom: 25px;
    font-size: 22px;
    color: #fff;
    text-align: center;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(142, 68, 173, 0.3);
}

/* Ряд под баннером (Сервера и Лидеры) */
.bottom-row {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: flex-start;
}

.bottom-row .card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Список серверов */
.server-list {
    display: flex;
    flex-direction: column;
}

.server-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(142, 68, 173, 0.1);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    transition: 0.3s;
}

.server-row:hover {
    background: rgba(142, 68, 173, 0.1);
    border-color: rgba(142, 68, 173, 0.4);
}

.server-info.name {
    font-size: 16px;
    font-weight: 700;
    flex: 2;
}

.server-info.score{
    flex: 1;
    font-size: 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.server-info.players {
    flex: 1;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.lb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(142, 68, 173, 0.15);
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.lb-row:hover {
    background: rgba(142, 68, 173, 0.1);
    border-color: rgba(142, 68, 173, 0.4);
}

.lb-rank {
    font-size: 22px;
    font-weight: 800;
    color: #8e44ad;
    width: 35px;
}

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

.lb-stats {
    text-align: right;
    line-height: 1.2;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
}

.lb-table th {
    text-align: left;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid rgba(142, 68, 173, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lb-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: background 0.3s ease;
}

.lb-table tr:last-child td {
    border-bottom: none;
}

.lb-table tr:hover td {
    background: rgba(142, 68, 173, 0.1);
}

/* Медали для Топ-3 */
.rank-1 {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-weight: 800;
    font-size: 25px;
}

.rank-2 {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
    font-weight: 800;
    font-size: 25px;
}

.rank-3 {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
    font-weight: 800;
    font-size: 30px;
}

.rank-default {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

.join-btn {
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}

.join-btn:hover {
    background: #fff;
    color: #111;
}

/* --- СТИЛИ ЧАТА --- */
.chat-card {
    height: 800px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #8e44ad;
    border-radius: 10px;
}

.chat-msg-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(142, 68, 173, 0.3);
}

.chat-name {
    font-size: 11px;
    font-weight: 700;
    color: #8e44ad;
    display: block;
}

.chat-name:hover {
    text-decoration: underline;
    color: #a29bfe;
}

.chat-text {
    font-size: 13px;
    color: #eee;
    word-break: break-word;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.chat-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
}

.chat-input-wrapper button {
    background: #8e44ad;
    border: none;
    color: #fff;
    border-radius: 5px;
    padding: 5px 12px;
    cursor: pointer;
}

/* Заглушки и лоадер */
.placeholder-line {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    border-radius: 3px;
}

.w-100 {
    width: 100%;
}

.w-70 {
    width: 70%;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(142, 68, 173, 0.1);
    border-top: 3px solid #8e44ad;
    border-radius: 50%;
    animation: spin 1s linear infinite;

}

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 120px;
}

/* --- Стили для профиля игрока --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(20, 10, 35, 0.8);
    border: 1px solid rgba(142, 68, 173, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: 0.3s;
}

.stat-card:hover {
    background: rgba(21, 10, 38, 0.65);
    border-color: rgba(142, 68, 173, 0.4);
}

.stat-title {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
}

.sortable {
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.sortable:hover {
    color: #8e44ad !important;
}

.sort-icon {
    font-size: 10px;
    margin-left: 5px;
    opacity: 0.7;
    display: inline-block;
    width: 10px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.flash-attacker {
    animation: flash-green 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.flash-victim {
    animation: flash-red 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.flash-assister {
    animation: flash-blue 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes flash-green {
    0% {
        background: rgba(46, 204, 113, 0.4);
        box-shadow: inset 0 0 20px rgba(46, 204, 113, 0.5);
    }

    100% {
        background: transparent;
        box-shadow: inset 0 0 0px rgba(46, 204, 113, 0);
    }
}

@keyframes flash-red {
    0% {
        background: rgba(231, 76, 60, 0.4);
        box-shadow: inset 0 0 20px rgba(231, 76, 60, 0.5);
    }

    100% {
        background: transparent;
        box-shadow: inset 0 0 0px rgba(231, 76, 60, 0);
    }
}

@keyframes flash-blue {
    0% {
        background: rgba(52, 152, 219, 0.4);
        box-shadow: inset 0 0 20px rgba(52, 152, 219, 0.5);
    }

    100% {
        background: transparent;
        box-shadow: inset 0 0 0px rgba(52, 152, 219, 0);
    }
}

.stat-card.pulse-update {
    animation: stat-pulse 1.5s ease-out;
}

@keyframes stat-pulse {
    0% {
        transform: scale(1);
        border-color: #8e44ad;
        box-shadow: 0 0 15px rgba(142, 68, 173, 0.6);
    }

    50% {
        transform: scale(1.05);
        border-color: #fff;
    }

    100% {
        transform: scale(1);
        border-color: rgba(142, 68, 173, 0.2);
    }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.status-online {
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

.status-online .status-dot {
    background-color: #2ecc71;
    box-shadow: 0 0 10px #2ecc71;
    animation: status-pulse 2s infinite;
}

.status-offline {
    color: rgba(255, 255, 255, 0.5);
}

.status-offline .status-dot {
    background-color: #7f8c8d;
}

@keyframes status-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* Для планшетов (ширина до 1000px)*/
@media (max-width: 1000px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .bottom-row {
        flex-direction: column;
    }

    .content-right {
        position: static;
        width: 100%;
    }
}

/* Для мобильных телефонов (ширина до 768px) */
@media (max-width: 768px) {


    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 40px;

        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(15, 7, 26, 0.9);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 15px;
    }


    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }


    .server-info.name,
    .server-info.score,
    .server-info.players {
        font-size: 14px;
    }

    .join-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Для очень маленьких экранов (менее 480px) */
@media (max-width: 480px) {


    .server-row {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        text-align: center;
    }

    .server-info.name {
        flex: 100%;
        margin-bottom: 5px;
    }
}

.main-footer {
    width: 100%;
    background-color: rgba(20, 10, 35, 0.95);
    border-top: 1px solid rgba(142, 68, 173, 0.3);
    padding: 40px 0 20px 0;
    margin-top: 50px;
    color: #fff;
    flex-shrink: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 60px;
}

.footer-info,
.footer-links,
.footer-copyright {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #8e44ad;
}

.footer-logo img {
    width: 30px;
    height: 30px;
}

.footer-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.footer-links h4 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #9b59b6;
}

.footer-copyright {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.steam-disclaimer {
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

/* Адаптив для мобилок */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-copyright {
        text-align: center;
    }
}

.legal-page {
    padding: 40px 0;
    line-height: 1.6;
}

.legal-card {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(20, 10, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(142, 68, 173, 0.3);
    padding: 50px;
}

.legal-card h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #fff;
}

.last-update {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.legal-content h3 {
    color: #9b59b6;
    margin-top: 25px;
    font-size: 20px;
}

.legal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.legal-content strong {
    color: #fff;
}

.back-btn {
    display: inline-block;
    margin-top: 40px;
    color: #8e44ad;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.back-btn:hover {
    color: #fff;
    text-shadow: 0 0 10px #8e44ad;
}


.server-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 1100px) {
    .server-cards-grid {
        grid-template-columns: 1fr;
    }
}

.sc-card {
    position: relative;
    overflow: hidden;
    background: rgba(20, 10, 35, 0.8);
    border: 1px solid rgba(142, 68, 173, 0.3);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    transition: 0.3s;
}


.sc-card:hover {
    border-color: rgba(142, 68, 173, 0.8);
    box-shadow: 0 0 20px rgba(142, 68, 173, 0.4);
    transform: translateY(-5px);
}

.sc-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 45px;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: 0.3s;
}

.sc-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(20, 10, 35, 0.4) 0%, rgba(10, 5, 18, 1) 100%);
}

.sc-card:hover .sc-bg {
    transform: scale(1.05);
}

.sc-content {
    position: relative;
    z-index: 1;
    padding: 20px 15px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sc-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.sc-map {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: auto;
}

.sc-players {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.sc-count {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-progress-bg {
    width: 60%;
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
}

.sc-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}


.sc-footer {
    position: relative;
    z-index: 1;
    height: 45px;
    background: rgba(10, 5, 18, 0.9);
    border-top: 1px solid rgba(142, 68, 173, 0.2);
    display: flex;
}

.sc-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: 0.2s;
    font-size: 16px;
}

.sc-btn:hover {
    color: #8e44ad;
    background: rgba(142, 68, 173, 0.1);
}

.sc-btn:first-child {
    border-right: 1px solid rgba(142, 68, 173, 0.2);
}

.sc-action-icon {
    width: 20px;
    height: 20px;
}

.sc-action-icon1 {
    width: 24px;
    height: 24px;
}


.row-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
}

.row-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 1px; /* Отступ между иконками */
    margin-left: 15px;
}

.icon-btn {
    background: transparent;
    border: none;
    padding: 5px;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-icon {
    width: 15px;
    height: 15px;
}

.action-icon1 {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    background: rgba(30, 35, 50, 0.8); 
    color: #ffffff;
}

/* Фикс самой строки, чтобы кнопки встали ровно */
.server-row {
    display: flex;
    align-items: center; /* Центрируем всё содержимое по вертикали */
    justify-content: space-between;
    padding: 3px 15px;
}