:root {
    --bg: #000000;
    --text: #f0f0f0;
    --accent: #ffffff;
    --muted: rgba(255, 255, 255, 0.6);
    --box-bg: rgba(255, 255, 255, 0.05);
    --chip-bg: rgba(255,255,255,0.08);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: monospace;
    margin: 0;
    padding: 2rem;
    max-width: 680px;
    margin-inline: auto;
    font-size: 16px;
    line-height: 1;
}

h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 2rem 0 1rem 0;
}

h3 {
    font-size: .9rem;
}

.p-marks {
    color: var(--muted);
}

a {
    text-decoration: none;
    color: var(--accent);
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul li {
    margin: 0.3rem 0;
}

/* Контакты в линию */
.social ul {
    display: flex;
    column-gap: 10px;
    flex-wrap: wrap;
}

.contact-box {
    background: var(--box-bg);
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.contact-box:hover {
    background: rgba(255, 255, 255, 0.1);
}

.contact-box img {
    width: 18px;
    height: 18px;
}

/* Skills как чипы */
.skills-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-chip {
    background: var(--chip-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.skill-chip:hover {
    background: rgba(255, 255, 255, 0.15);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.6rem;
}

td {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-toggle {
    cursor: pointer;
    background: var(--box-bg);
    border-radius: 8px;
    padding: .6rem  .6rem;
    flex-shrink: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile {
    display: flex;
    width: 100%;
    align-items: center;
    line-height: 6px;
    gap: 1.1rem;
    justify-content: start;
    min-height: 140px;
}

.list {
    margin: 0;
    padding-left:9px;
}

.tagline {
    color: rgba(255, 255, 255, 0.23);
}

h1.nick {
    color: var(--accent);
    display: flex;
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    text-align: right;
}

.profile img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(128, 128, 128, 0.3);
    object-fit: cover;
    align-self: flex-start;
}
footer {
    flex-direction: column;
    gap: 6px;
    display: flex;
    margin-bottom: 2rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
}

.device-card img {
    height: 1rem;
    width: 1rem;
}

.device-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-top: 1rem;
    padding-bottom: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.device-cards-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    opacity: 1;
    z-index: 2;
}

.device-cards::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.device-cards::-webkit-scrollbar-track {
    background: var(--box-bg);
    border-radius: 3px;
}

.device-cards::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.device-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.device-card {
    padding: 1rem;
    background: var(--box-bg);
    border-radius: 10px;
    display: flex;
    flex-shrink: 0;
    gap: .6rem;
    flex-direction: column;
    transition: transform .2s, background .2s;
    scroll-behavior: smooth;
}

.playtime-in-total {
    display: flex;
    box-sizing: border-box;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.playtime-in-total img {
    width: 20px;
    height: 20px;
}

.device-cards h2 {
    width: 100%;
    margin: 0 0 0.5rem 0;
}

.device-header {
    display: flex;
    gap: .6rem;
    align-items: center;
}

.device-card:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.08);
}

.device-cards-container {
    position: relative;
    width: 100%;
}

.player {
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    width: 100%;
}

.title {
    width: 100%;
    display: flex;
    align-items: start;
    flex-direction: column;
    margin-bottom: 5px;

}

.title h2 {
    margin-bottom: 5px;
}

.title h3 {
    margin-top: 0;
}

.track-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    margin: 0;
    padding: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.track-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.track.playing {
    border: 2px solid rgba(243, 219, 210, 0.8);
    box-shadow: 0 0 8px rgba(243, 219, 210, 0.4);
    animation: borderPulse 1s infinite alternate;
}

@keyframes borderPulse {
    0% {
        border-color: rgba(243, 219, 210, 0.5);
        box-shadow: 0 0 4px rgba(243, 219, 210, 0.2);
    }
    100% {
        border-color: rgba(243, 219, 210, 1);
        box-shadow: 0 0 12px rgba(243, 219, 210, 0.5);
    }
}

.track-column {
    display: flex;
    gap: 10px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: visible;
    width: max-content;
}

.track:not(:first-child) {
    margin-top: 9px;
}

h3.tagline {
    padding-left: 1.4rem;
}

.track {
    flex: 0 0 auto;
    max-width: 300px;
    max-height: 70px;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
    line-height: 1.4rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    background: var(--box-bg);
    transition: transform 0.2s, background 0.2s;
    border-radius: 20px;
    padding: 10px;
    gap: 10px;
}

.track:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.track img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    padding-left: 2px;
    border-radius: 12px;
    flex-shrink: 0;
}

.track-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.track-name {
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-time-later {
    height: 0;
    opacity: 0.4;
    padding: .5rem;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    color: var(--muted);
}

.track-artist {
    font-size: 14px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-list::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 1;
}


.track-list::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.game-bar {
    display: flex;
    height: 300px;
    border-radius: 40px 0 0 40px;
    border: 2px solid #000000;
    margin-top: -15px;
    width: 100%;
    background: rgba(7, 7, 7, 1);
}

.game-left-section {
    padding: 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 19px;
    width: 40%;
}

.last-game {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 20px;
    overflow: hidden;
    height: 200px;
    background: var(--box-bg);
    width: 100%;
    position: relative;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 33%,
            rgba(0, 0, 0, 0.3) 66%,
            rgba(0, 0, 0, 0) 100%
    );
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;

    mask-image: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.8) 20%,
            rgba(0, 0, 0, 0.6) 40%,
            rgba(0, 0, 0, 0.4) 60%,
            rgba(0, 0, 0, 0.2) 80%,
            rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.8) 20%,
            rgba(0, 0, 0, 0.6) 40%,
            rgba(0, 0, 0, 0.4) 60%,
            rgba(0, 0, 0, 0.2) 80%,
            rgba(0, 0, 0, 0) 100%
    );
}


.game-head,
.game-information {
    position: relative;
    z-index: 2;
}

.game-head {
    overflow: hidden;
    display: flex;
    gap: .9rem;
    flex-direction: row;
}

.game-information {
    display: flex;
    padding-left: .5rem;
    flex-direction: column;
    align-items: start;
}

.game-information h3 {
    line-height: 0;
}

.game-title {
    font-size: .85rem;
}

.last-game-title {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

h2.last-game-title {
    color: #fff;
    font-weight: 700;
    margin-top: 0;
    text-shadow:
            0 0 5px #000,
            0 0 10px #000,
            0 0 15px #000;
}

h2.game-title {
    flex-direction: row;
    margin-top: 0;
}

.info-box {
    box-sizing: border-box;
    display: flex;
    overflow: hidden;
    justify-items: start;
    padding-left: 15px;
    align-items: center;
    border-radius: 20px;
    background: var(--box-bg);
    height: 50px;
    width: 100%;
}

.game-section {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.last-game img {
    height: 60px;
    width: 60px;
    border: 1px solid #000000;
    border-radius: 10px;
}

.game-right-section {
    padding: 0;
    display: flex;
    width: 50%;
    margin-left: auto;
    border-radius: 30px 0 0 30px;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.8) 0%,
    rgba(12,12,12,1) 30%,
    rgb(12, 12, 12) 100%);
    overflow: hidden;
}

.game-lib {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    max-height: 100vh;
}

.game-lib::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.game-lib::-webkit-scrollbar-track {
    background: transparent;
}

.game-lib::-webkit-scrollbar-thumb {
    background: transparent;
}

.game-lib::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Скрываем scrollbar для Firefox */
.game-lib {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}

.game {
    align-items: center;
    display: flex;
    box-sizing: border-box;
    gap: 10px;
}

h2.playtime {
    margin: 0;
}

.game-info {
    width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 5px;
    flex-direction: column;
}

.game img {
    border-radius: 10px;
    height: 40px;
    width: 40px;
}

/*  для мабилки */
@media (max-width: 768px) {
    .game-bar {
        flex-direction: column;
        height: auto;
        border-radius: 20px;
        width: 100%;
    }

    .game-right-section {
        background: linear-gradient( 360deg, rgba(0, 0, 0, 0.8) 0%,
        rgba(12, 12, 12, 1) 30%,
        rgb(12, 12, 12) 100%);
    }

    .game-left-section,
    .game-right-section {
        width: 100% !important;
        margin: 0 !important;
        padding: 15px;
        box-sizing: border-box;
    }

    h2.last-game-title {
        font-size: 1.2rem;
        font-weight: bold;
    }

    .game-left-section {
        align-items: stretch;
    }

    .game-right-section {
        border-radius: 0 0 20px 20px;
    }

    .last-game,
    .info-box {
        width: 100% !important;
        height: 100%;
        min-height: 40px;
    }

    .game-lib {
        max-height: 300px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {

    .device-cards {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .5rem;
    }

    .device-cards h2 {
        display: flex;
        flex: 0 0 100%;
    }

    .device-card {
        flex: 0 0 auto;
        min-width: max-content;
        scroll-snap-align: start;
    }

    @media (hover: hover) {
        .device-card:hover {
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.08);
        }
    }

    /*.device-card {*/
    /*    padding: 1rem;*/
    /*    background: var(--box-bg);*/
    /*    border-radius: 10px;*/
    /*    display: flex;*/
    /*    width: 100%;*/
    /*    gap: .6rem;*/
    /*    flex-direction: column;*/
    /*    transition: transform .2s, background .2s;*/
    /*}*/

    .track-list {
        flex-direction: row;
        gap: 0;
    }

    .track-column {
        max-width: 100%;
        width: 100%;
    }

    .track {
        line-height: 1.1rem;
        max-height: 60px;
    }

    .track img {
        width: 40px;
        height: 40px;
    }

    .track-name {
        font-size: 14px;
    }

    .track-artist {
        font-size: 12px;
    }

    body {
        font-size: 14px;
    }

    h1.nick {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1rem;
    }

    /*.device td {*/
    /*    font-size: 13px;*/
    /*}*/
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    h1.nick {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1rem;
    }

    .device-cards td {
        font-size: 12px;
    }
}

.device-cards td:first-child {
    font-weight: bold;
    padding-right: 12px;
    white-space: nowrap;
}

.device-cards td:last-child {
    padding-left: 8px;
}