/* =========================================================
   VARIABLES
   ========================================================= */
:root {
    --font-default: Torus, Inter, "Helvetica Neue", Tahoma, Arial, sans-serif;
    --font-content: Inter, sans-serif;

    --gold:    #ffcc00;
    --steam:   19, 92, 143;
    --osu:     244, 114, 172;
    --github:  0, 0, 0;
    --discord: 88, 101, 242;
    --twitch:  145, 70, 255;

    --table-header-bg:    #1e1e1e;
    --table-header-color: #aaaaaa;
    --table-row-hover:    #262626;
    --table-row-border:   #2a2a2a;
    --table-text:         #e0e0e0;
    --table-muted:        #b8b8b8;
    --table-accent:       var(--gold);
}

/* =========================================================
   RESET & BASE
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-default);
    background-color: #121212;
    color: #e0e0e0;
    text-align: center;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p, h1, h2, h3, h4, h5, h6, span { color: #ffffff; }
a { color: #c6cdd3; text-decoration: none; }

hr {
    margin: 20px 0;
    border: none;
    height: 2px;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

*::-webkit-scrollbar {
    height: 0;
    width: 0;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.flex {
    display: flex;
    align-items: center;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.sections {
    display: flex;
    justify-content: center;
    max-width: 540px;
    width: 100%;
    margin: 0 auto 20px;
    padding: 10px 20px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    background: #1e1e1e;
    border: 2px solid var(--gold);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
}

.sections-list {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sections-list li {
    border-radius: 5px 5px 0 0;
    padding: 10px 15px;
    border-bottom: 2px solid transparent;
    color: #9aa5b1;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sections-list li:hover,
.sections-list li.active {
    color: #ffffff;
    border-bottom: 2px solid var(--gold);
}

.sections-list li a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   CONTAINER
   ========================================================= */
.container {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    border-radius: 10px;
    background: #1e1e1e;
    border: 2px solid var(--gold);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
}

/* =========================================================
   AVATAR & PROFILE
   ========================================================= */
.avatar-information {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.avatar {
    margin-bottom: 10px;
}

.profile-img {
    display: block;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
    object-fit: cover;
    background: #2a2a2a;
}

.avatar-name h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.8);
    margin-top: 5px;
}

.playing-in {
    margin-top: 10px;
    padding: 8px 15px;
    background: #063c11;
    color: #0ABF30;
    border-radius: 6px;
    border: 1px solid #0ABF30;
    font-size: 0.9rem;
    display: inline-block;
}

.playing-in a {
    color: #0ABF30;
    font-weight: bold;
    text-decoration: underline;
}

.error-information {
    margin-top: 10px;
    padding: 10px;
    background: #330000;
    color: #ff6666;
    border-radius: 6px;
    border: 1px solid #ff0000;
    font-size: 0.9rem;
}

/* =========================================================
   TEXT BLOCKS
   ========================================================= */
.about-message {
    margin: 10px 0;
    padding: 5px;
    border-radius: 10px;
}

.about-message p {
    font-family: var(--font-content);
    color: #dddddd;
    background: #222222;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.5;
}

.fucking-game {
    padding-bottom: 15px;
}

.fucking-game p {
    font-family: var(--font-content);
    font-size: 1rem;
    padding: 12px;
    border-radius: 6px;
    color: #ff6666;
    background: #330000;
    line-height: 1.5;
}

.subtext {
    display: block;
    margin-top: 10px;
    font-family: var(--font-content);
    font-size: 0.9rem;
    color: #aaaaaa;
    background: #222;
    padding: 12px;
    border-radius: 6px;
    line-height: 1.5;
}

/* =========================================================
   SOCIAL LINKS
   ========================================================= */
.social {
    padding: 15px 20px;
    border-radius: 10px;
    background-color: #222;
    border: 2px solid var(--gold);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-title h3 {
    font-size: 1.5rem;
    color: var(--gold);
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.8);
    margin-bottom: 15px;
    font-weight: 700;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    border-radius: 8px;
    background: #222;
    color: #ffffff;
    font-family: inherit;
    font-size: inherit;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    border: 2px solid var(--gold);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.block:hover {
    background: #2a2a2a;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
}

/* Individual brand colors */
.block.steam   { border-color: rgb(var(--steam))   !important; box-shadow: 0 0 10px rgba(var(--steam),   0.5) !important; }
.block.steam:hover   { box-shadow: 0 0 15px rgba(var(--steam),   0.8) !important; }
.block.osu     { border-color: rgb(var(--osu))     !important; box-shadow: 0 0 10px rgba(var(--osu),     0.5) !important; }
.block.osu:hover     { box-shadow: 0 0 15px rgba(var(--osu),     0.8) !important; }
.block.github  { border-color: rgb(var(--github))  !important; box-shadow: 0 0 10px rgba(var(--github),  0.5) !important; }
.block.github:hover  { box-shadow: 0 0 15px rgba(var(--github),  0.8) !important; }
.block.discord { border-color: rgb(var(--discord)) !important; box-shadow: 0 0 10px rgba(var(--discord), 0.5) !important; }
.block.discord:hover { box-shadow: 0 0 15px rgba(var(--discord), 0.8) !important; }
.block.twitch  { border-color: rgb(var(--twitch))  !important; box-shadow: 0 0 10px rgba(var(--twitch),  0.5) !important; }
.block.twitch:hover  { box-shadow: 0 0 15px rgba(var(--twitch),  0.8) !important; }

/* Left part */
.social-container-1 {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon img {
    width: 30px;
    height: 30px;
    display: block;
}

.social-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

/* Right part */
.social-container-2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-grow: 1;
    text-align: right;
}

.social-description-data {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
}

.social-description-text {
    font-family: var(--font-content);
    font-size: 0.85rem;
    color: #b8b8b8;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.block:hover .social-description-text {
    color: #ffffff;
}

.social-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #b8b8b8;
    transition: color 0.2s ease, transform 0.2s ease;
}

.block:hover .social-action-icon {
    color: #ffffff;
    transform: scale(1.1);
}

.social-action-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   NOTIFICATIONS
   ========================================================= */
.notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    pointer-events: none;
}

.notifications .toast {
    background: #222;
    border: 2px solid var(--gold);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    padding: 12px 18px;
    border-radius: 8px;
    color: #ffffff;
    min-width: 180px;
    animation: toastIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: var(--font-content);
    font-size: 0.9rem;
}

.notifications .toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

.notifications .toast.success {
    border-color: #0ABF30;
    box-shadow: 0 0 15px rgba(10, 191, 48, 0.4);
}

.notifications .toast.error {
    border-color: #e63946;
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 650px) {
    .block {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .social-container-2 {
        justify-content: flex-start;
        text-align: left;
        width: 100%;
    }

    .social-description-data {
        justify-content: flex-start;
    }
}


/* =========================================================
   TABLES (generic — reusable anywhere)
   ========================================================= */

/* Обёртка даёт горизонтальный скролл на узких экранах */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: var(--font-content);
    font-size: 0.9rem;
    color: var(--table-text);
}

/* --- Заголовок --- */
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--table-header-color);
    background: var(--table-header-bg);
    border-bottom: 2px solid var(--table-accent);
}

/* --- Строки --- */
.table tbody tr {
    border-bottom: 1px solid var(--table-row-border);
    transition: background-color 0.15s ease;
}

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

.table tbody tr:hover {
    background: var(--table-row-hover);
}

/* --- Ячейки --- */
.table td {
    padding: 8px 12px;
    vertical-align: middle;
    overflow: hidden;
}

/* --- Утилиты выравнивания (работают в любой таблице) --- */
.table .text-left   { text-align: left;   }
.table .text-center { text-align: center; }
.table .text-right  { text-align: right;  white-space: nowrap; }

/* --- Плотность --- */
.table--compact  td,
.table--compact  thead th  { padding: 6px 10px;  }

.table--spacious td,
.table--spacious thead th  { padding: 12px 16px; }

/* --- Полосатые строки (опционально) --- */
.table--striped tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.table--striped tbody tr:nth-child(even):hover {
    background: var(--table-row-hover);
}

/* --- Состояния внутри обёртки --- */
.table-state {
    padding: 30px 20px;
    text-align: center;
    color: var(--table-header-color);
    font-family: var(--font-content);
    font-size: 0.9rem;
}

/* --- Утилита: скрыть столбец на узких экранах --- */
@media (max-width: 650px) {
    .table .hide-sm {
        display: none;
    }
}


/* =========================================================
   GAMES PAGE (только специфичные модификаторы)
   ========================================================= */
.user-games {
    text-align: left;
}

.user-games-title h3 {
    font-size: 1.5rem;
    color: var(--gold);
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.8);
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
}

.user-games-data {
    width: 100%;
}

/* --- Ширины колонок --- */
.games-table thead th.col-name        { width: 55%; }
.games-table thead th.col-playtime    { width: 20%; }
.games-table thead th.col-last-played { width: 25%; }

@media (max-width: 650px) {
    .games-table thead th.col-name     { width: 70%; }
    .games-table thead th.col-playtime { width: 30%; }
}

/* --- Ячейки времени/даты --- */
.games-table td.game-cell--playtime,
.games-table td.game-cell--last-played {
    font-size: 0.85rem;
    color: var(--table-muted);
}

/* --- Ссылка «игра»: иконка + название --- */
.game-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.game-link:hover .game-title {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.game-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #ffffff;
    transition: color 0.15s ease;
}

/* --- Иконка игры (перекрывает общий .icon соц-блоков) --- */
.game-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    background: #2a2a2a;
}

.game-icon .icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- SVG часов/календаря --- */
.clock-icon,
.calendar-icon {
    width: 13px;
    height: 13px;
    fill: #888;
    vertical-align: -2px;
    margin-right: 4px;
    flex-shrink: 0;
}

.playtime-value { color: var(--gold); font-weight: 600; }
.last-played    { color: #c6cdd3; }

@media (max-width: 650px) {
    .game-icon  { width: 28px; height: 28px; }
    .game-link  { gap: 8px; }
    .game-title { font-size: 0.85rem; }
}

/* =========================================================
   STATES (error / loading — общие для страниц с данными)
   ========================================================= */
.error-container:empty { display: none; }

.error-banner-incontent {
    padding: 15px;
    background: #330000;
    border: 1px solid #ff0000;
    border-radius: 8px;
    margin-bottom: 15px;
}

.error-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.error-icon {
    font-size: 2rem;
    color: #ff6666;
    flex-shrink: 0;
}

.error-message h1 {
    font-size: 1.2rem;
    color: #ff6666;
    margin-bottom: 4px;
}

.error-message p {
    font-family: var(--font-content);
    font-size: 0.9rem;
    color: #ffb3b3;
    line-height: 1.4;
}