@font-face {
  font-family: 'Vorcas-Regular';
  src: url('./Vorcas-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Sangyo-Regular';
  src: url('./Sangyo.ttf') format('truetype');
}

:root {
    --dark-color: #1a1a1a;
    /* --accent-color: #ff5500; */
    --accent-color: #ff5500;
    --white-color: #f2f2f2;
}

/* === СБРОС И БАЗОВЫЕ НАСТРОЙКИ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: "Inter", "Segoe UI", sans-serif;
    scroll-behavior: smooth;
}

body {
    display: flex;
    height: 100vh;
    color: #f2f2f2;
    background-color: #0e0e0e;
}

.flex {
    display: flex;
}
.flex-c {
    flex-direction: column;
}
.flex-r {
    flex-direction: row;
}
.flex-jc-b {
    justify-content: space-between;
}
.flex-ai-c {
    align-items: center;
}

.mg-r-1 {
    margin-right: 1em;
}

/* === ЛЕВОЕ МЕНЮ === */
.menu {
    flex: 0 0 240px;
    background: linear-gradient(180deg, #1a1a1a, #111);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5em;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin-bottom: 1.5em;
}

.menulist {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    flex: 1;
}

.timebox {
  font-family: 'Vorcas-Regular', monospace;
  font-size: 1.7em;
  color: #fff;
  text-align: center;
}
.timebox #seconds {
    font-size: 0.8em;
}

/* Важно: чтобы шрифт применялся к span внутри */
.timebox span {
  font-family: inherit;
display: inline-block;
  /* width: 1ch; */
  text-align: center;
}

.digit {
  font-family: monospace;  
  width: 1.95ch;
}
#hours {
    width: auto;
}

#colon {
  transition: opacity 0.3s;
  width: 0.3ch;
}


.socialul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1em;
  padding: 0;
}

.socialli {
  margin: 0;
}

.sociallink {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6em;
  padding: 0.8em 1em;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: #ddd;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sociallink:hover {
  background: #ff5500;
  color: #fff;
  transform: translateY(-2px);
}

.sociallink svg {
  flex-shrink: 0;
}

.social-text {
  font-size: 1rem;
  height: 24px;
  margin-left: 0.5em;
}
.menuul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 0;
    margin-top: 2em;
}
.menulink {
    background: transparent;
    margin-top: 1em;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;
}

/* Верхняя часть с флешами и голосованием */
.flash {
    background: #ff5500;
    color: white;
    text-align: center;
    padding: 0.0em;
    font-weight: bold;
}

/* Контентная область */
.content {
    flex: 1;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 2em;
    padding-bottom: 6em;
}

.box {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1em;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* === КАРТОЧКИ ТРЕКОВ === */
.fresh, .votebox, .history {
    display: flex;
    gap: 1em;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5em;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0) transparent;
    transition: scrollbar-color 0.3s ease;
}

.box:hover {
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.box::-webkit-scrollbar {
    height: 10px;
    transition: opacity 0.3s ease;
}
.box::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0);
    border-radius: 4px;
}
.box:hover::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
}

.history {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content:start; 
}

.history_card {
    /* background: rgba(255, 255, 255, 0.05); */
    border-radius: 5px;
    overflow: hidden;
    flex: 1 1 calc(20% - 2em);
    max-width: 100%;
    min-width: 300px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1em;
    position: relative;
    transition: 0.3s;
}
.history_card:hover {
    background: rgba(255, 255, 255, 0.166);
}

.history_card img {
    height: 35px;
    width: 35px;
    border-radius: 5px;
    margin-left: 5px;
}
.history_card div {
    flex: 1;
    overflow: hidden;
}
.history_card div .stitle {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 75px;
}
.history_card div .sartist {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history_card .time {
    position:absolute;
    right: 0;
    top: 0;
}

.freshka {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    width: 220px;
    flex: 0 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.freshka:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 12px rgba(255,255,255,0.1);
}
.play-fresh {
    position: relative;
    border-radius: 15px;
    border: none;
    background-color: transparent;
}

.freshka img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease
}

.freshka p {
    padding: 0.4em 0.8em;
    text-align: center;
    color: #eee;
    font-size: 0.9rem;
}

.play-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
}
.play-overlay svg {
    height: 90%;
    width: 90%;
    color: #fff;
}


.freshka:hover .play-fresh img {
    filter: brightness(0.5);
}
.freshka:hover .play-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.podcast-card {
    min-width: 400px;
    min-height: 100px;
    flex-direction: row;
}
.podcast-card img {
    height: 100px;
    width: 100px;
}
.podcast-card p {
    text-align: left;
}

/* Кнопки голосования */
.votes {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    padding-bottom: 0.5em;
}
.votes button {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 0.4em 0.6em;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.votes button.active {
    background: #ff5500 !important;
    color: #fff;
}

.votes button:hover {
    background: #ff5500;
}

/* === ПЛЕЕР === */
.player {
    position: fixed;
    bottom: 0;
    left: 240px;
    right: 0;
    height: 95px;
    background: #181818;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    padding: 0 1em;
    gap: 1em;
}

#play-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s;
    max-width: 64px;
    max-height: 64px;
}
#play-btn svg {
    height: 64px;
    width: 64px;
}
#play-btn:hover {
    color: #ff5500;
}

#song-art {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

#song-artist, #song-title {
    color: #eee;
    font-size: 0.9rem;
    margin: 0;
}
#listeners {
    margin-right: 5px;
}

.volume, .time {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #ccc;
    margin: 0px 10px;
}
.volume button, .volume button svg {
    background-color: transparent;
    border: none;
    color: white;
    height: 20px;
    width: 20px;
}

input[type="range"] {
    accent-color: #ff5500;
}

.chat {
    /* background-color: transparent; */
    border: none;
    color: white;
    display: flex;
    flex-direction: row;
    align-items: center;
    /* justify-content: space-between; */
    width: 100%;
    /* height: 50px; */
}
a#chatBtn {
    cursor: pointer;
    display: none;
    height: 20px;
    flex-direction: row;
    align-items: center;
}
.chat svg {
    width: 20px;
    height: 20px;
}
.chat span {
    font-size: 15px;
}

.chatbox {
  position: fixed;
  bottom: 100px;
  right: 5px;
  background-color: #181818;
  opacity: 0;
  width: 25%;
  height: 35%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px #eee solid;
  overflow: hidden;
  padding: 1em;

  transform: translateY(30px);
  pointer-events: none;

  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chatbox.show {
  opacity: 0.95;
  transform: translateY(0);
  pointer-events: auto;
}


/* Контейнер с сообщениями */
.messages {
    flex: 1;                      /* занимает всё оставшееся место */
    overflow-y: auto;             /* прокрутка сообщений */
    padding: 0.5em;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

/* Поле ввода внизу */
.chatinput {
    border: none;
    border-radius: 15px;
    outline: none;
    padding: 0.5em;
    width: 100%;
    font-size: 1em;
    background: rgba(255,255,255,0.1);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Дополнительно: лёгкий hover эффект */
.chatinput:focus {
    background: rgba(255,255,255,0.2);
}

.msg {
    border: 1px white solid;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 5px;
}
.msg .mauthor {
    font-weight: bold;
}
.msg .mdate {
    font-size: 10px;
    font-style: italic;
}

/* === СКРОЛЛ === */
::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.subtitle {
  display: block;
  background-color: #dac141;
  width: fit-content;
  color: #0e0e0e;
  padding: 0.6rem;
  font-family: 'Sangyo-Regular';
  font-weight: bolder;
  font-size: clamp(1.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  word-wrap: break-word;
}

.subtitle span {
    color: #d60101;
    font-family: 'Sangyo-Regular';
}

/* === АДАПТИВ === */
/* === МОБИЛЬНЫЙ АДАПТИВ === */
@media (max-width: 900px) {
    body {
        flex-direction: column;
        height: 100%;
    }

    /* Логотип сверху */
    .menu {
        flex: 0 0 auto;
        width: 100%;
        background: none;
        border-right: none;
        display: flex;
        justify-content: center;
        padding: 1em 0;
        position: relative;
        z-index: 10;
    }

    .menu .logo {
        position: relative;
        margin: 0 auto;
    }
    .menu .logo img {
        width: 120px;
        height: 120px;
    }
    .socialul {
        margin-top: 3em;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }
    .playlist {
        display: none;
    }
    .menuul {
        display: none;
    }

    #clock {
        display: none;
    }

    /* Основной контент */
    .main {
        flex: 1;
        margin: 0;
        padding: 1em;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 1.5em;
        margin-bottom: 5em;
    }
    .content {
        padding-top: 0;
    }

    /* Контейнер с карточками */
    .fresh, .votebox {
        display: flex;
        flex-wrap: nowrap;
        gap: 1em;
        overflow-x: auto; /* Горизонтальный скролл */
        scroll-behavior: smooth;
        padding-bottom: 0.5em;
    }

    .freshka {
        flex: 0 0 180px; /* Фиксированная ширина, крупные карточки */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-radius: 12px;
        background: rgba(255,255,255,0.05);
        overflow: hidden;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .freshka img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .freshka p {
        font-size: 0.85rem;
        text-align: center;
        padding: 0.4em 0.6em;
    }

    /* Голосование */
    .votes {
        justify-content: center;
        gap: 0.5em;
    }
    .votes button {
        padding: 0.4em 0.6em;
        font-size: 1.1em;
    }

    .history {
        margin-bottom: 0;
    }
    .history_card {
        max-width: none;
        flex: 1 1 100%;
    }

    .podcast-card {
        min-width: 250px;
        min-height: 80px;
        padding: 0.5em;
        gap: 0.5em;
    }
    .podcast-card img {
        width: 70px;
        height: 70px;
        border-radius: 6px;
    }
    .podcast-card p {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    /* Плеер */
    .player {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0.5em;
        background: #181818;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    #play-btn svg {
        width: 48px;
        height: 48px;
    }
    #song-art {
        width: 50px;
        height: 50px;
    }
    #song-artist, #song-title {
        font-size: 0.8rem;
    }

    /* Чат */
    a#chatBtn {
        display: flex;
    }
    button#chatBtn {
        display: none;
    }
    .chatb {
        display: none;
    }

    .chatbox {
        width: 90%;
        height: 40%;
        bottom: 110px;
        right: 5%;
        padding: 0.5em;
        margin-bottom: 1em;
    }
    .messages {
        flex: 1;
        overflow-y: auto;
        gap: 0.3em;
    }
    .chatinput {
        font-size: 0.9rem;
        padding: 0.4em;
    }
    .subtitle {
        font-size: clamp(0.5rem, 2rem, 4rem);
        /* width: 100%; */
        /* text-align: center; */
    }

}

/* Для смартфонов */
@media (max-width: 480px) {
    .freshka {
        flex: 0 0 150px;
    }
    .freshka img {
        height: 150px;
    }
    .freshka p {
        font-size: 0.75rem;
    }
    .podcast-card {
        min-width: 200px;
        min-height: 70px;
        padding: 0.4em;
        gap: 0.4em;
    }
    .podcast-card img {
        width: 55px;
        height: 55px;
        border-radius: 5px;
    }
    .podcast-card p {
        font-size: 0.8rem;
        line-height: 1.1;
    }

    .player {
        flex-direction: column;
        gap: 0.3em;
        height: auto;
    }
    #play-btn svg {
        width: 36px;
        height: 36px;
    }
    #song-art {
        width: 36px;
        height: 36px;
    }
    #song-artist, #song-title {
        font-size: 0.7rem;
    }

    .volume, .time {
        flex-wrap: nowrap;
        gap: 0.3em;
        font-size: 0.75rem;
    }
    a#chatBtn {
        display: flex;
    }
    button#chatBtn {
        display: none;
    }

    .chatbox {
        width: 95%;
        height: 35%;
        bottom: 80px;
        right: 2.5%;
    }
    .chatinput {
        font-size: 0.85rem;
    }

    .subtitle {
        width: 100%;
        text-align: center;
        font-size: 20px;
    }
}

/* Общие улучшения адаптива */
.fresh, .votebox {
    overflow-x: auto;
}
.fresh::-webkit-scrollbar, .votebox::-webkit-scrollbar {
    height: 6px;
}
