@font-face {
    font-family: 'OswaldLocal';
    src: url('files/Oswald-regular.woff2') format('woff2'),
        url('files/Oswald-regular.woff') format('woff');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RubikLocal';
    src: url('files/Rubik-Regular.woff2') format('woff2'),
        url('files/Rubik-Regular.woff') format('woff');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'RubikLocal', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #181512;
    color: #F2E8D9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100dvh;
    overflow: hidden;
}

.main-container {
    height: 100dvh;
    max-width: 500px;
    margin: 0 auto;
    background: #181512;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shapka {
    padding: 5px 5px 0px 5px;
    flex: 1 2 50%;
    min-width: 0;
    min-height: 0;
}

.osnovna-kartynka {
    position: relative;
    width: 100%;
    height: 100%;
}

.kartynka {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.logo {
    position: absolute;
    top: 20px;
    left: 25px;
    z-index: 10;
}

.logo img {
    width: 65px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.zagolovok {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-family: 'OswaldLocal', 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 1px;
    color: #ffa20c;
    margin: 0;
    padding: 20px 15px;
    background: rgba(24, 21, 18, 0.35);
    border-radius: 0 0 12px 12px;
    width: 100%;
    box-sizing: border-box;
}

.zagolovok::first-letter {
    text-transform: uppercase;
}

.content {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 24px 15px 24px;
    overflow: hidden;
}

.nav {
    flex-shrink: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    width: 100%;
}

.nav-item {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0);
    border: 1px solid rgba(242, 232, 217, 0.04);
    color: #a2917a;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: 'RubikLocal', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.nav-item img {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.nav-item span {
    display: inline-block;
    line-height: 1.1;
    white-space: normal;
}

.nav-item:hover {
    background: rgba(255, 162, 12, 0.03);
    color: #d9b07a;
}

.nav-item.active {
    background: #2a241f;
    color: #ffa20c;
    border-color: rgba(255, 162, 12, 0.12);
}

.pleyer {
    flex-shrink: 0;
    margin-bottom: 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(255, 162, 12, 0.05);
    border: 1px solid rgba(255, 162, 12, 0.15);
    border-radius: 8px;
}

.pleyer .controls {
    flex: 0 0 auto;
}

.pleyer button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #ffa20c;
    background: rgba(255, 162, 12, 0.1);
    color: #ffa20c;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pleyer button:hover {
    background: rgba(255, 162, 12, 0.2);
}

.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 162, 12, 0.15);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #ffa20c;
    width: 0%;
    border-radius: 3px;
}

.text-wrap {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    height: 190px;
    scrollbar-width: thin;
}

.text-wrap:before {
    content: "";
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    top: 0;
    height: 15px;
    background: linear-gradient(180deg, #181512, rgba(24, 21, 18, 0));
    pointer-events: none;

}

.text-wrap:after {
    content: "";
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    height: 20px;
    background: linear-gradient(180deg, rgba(24, 21, 18, 0), #181512);
    pointer-events: none;
}

.description {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 10px 0;
    font-size: 16px;
    line-height: 1.375;
    color: #f2e8d9;
    scrollbar-width: thin;
    scrollbar-color: #ffa20c rgba(255, 162, 12, 0.12);
}

.description::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.description::-webkit-scrollbar-track {
    background: rgba(255, 162, 12, 0.12);
    border-radius: 3px;
}

.description::-webkit-scrollbar-thumb {
    background: #ffa20c;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.description::-webkit-scrollbar-thumb:hover {
    background: #ffb84a;
}

.description b {
    color: #ffa20c;
    font-weight: 600;
}

.hidden {
    display: none;
}

@media (orientation: landscape) and (max-width: 1024px) {
    .shapka {
        padding: 10px;
        width: 50%;
    }

    .main-container {
        max-width: 100%;
        flex-direction: row;
    }

    .text-wrap {
        height: auto;
    }

    .content {
        flex-shrink: 1;
        width: 50%;
    }
}