
:root {
    --background: #101014;
    --surface: #1c1c24;
    --accent: #9561ff;
    --text: #ffffff;
    --muted: #92929f;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    color: white;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1.5px;
}

.logo span {
    color: var(--accent);
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface);
}

main {
    padding: 0 16px 110px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

h1 {
    font-size: 30px;
    letter-spacing: -1px;
}

h2 {
    font-size: 20px;
}

.hero {
    min-height: 300px;
    padding: 28px 22px;
    border-radius: 24px;
    background: linear-gradient(
        145deg,
        #6131a6,
        #30204e 55%,
        #181820
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero h1 {
    font-size: 38px;
    margin: 12px 0;
    line-height: 1.05;
}

.hero p {
    color: #ded4ee;
    line-height: 1.5;
}

.tag {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #d5bfff;
}

.primary {
    background: var(--accent);
    padding: 15px 20px;
    border-radius: 14px;
    font-weight: 700;
    margin-top: 12px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

.section-title button {
    background: transparent;
    color: var(--accent);
}

.movie-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.movie-row .movie {
    min-width: 135px;
    width: 135px;
}

.movie {
    cursor: pointer;
    min-width: 0;
}

.poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    background: linear-gradient(145deg, #34264e, #1c1c24);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie h3 {
    font-size: 14px;
    margin: 9px 0 4px;
    overflow-wrap: anywhere;
}

.movie p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
}

.search {
    width: 100%;
    padding: 15px;
    border: 1px solid #30303b;
    border-radius: 14px;
    background: var(--surface);
    color: white;
    outline: none;
}

.categories {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.categories button {
    background: var(--surface);
    padding: 10px 18px;
    border-radius: 20px;
    color: var(--muted);
}

.categories button.selected {
    background: var(--accent);
    color: white;
}

.navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 12px 4px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #18181fee;
    backdrop-filter: blur(20px);
    border-top: 1px solid #2c2c35;
}

.navigation button {
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.navigation button span {
    font-size: 27px;
}

.navigation button.active {
    color: var(--accent);
}

.profile-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
}

.profile-avatar {
    font-size: 48px;
}

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

.profile-info {
    display: flex;
    justify-content: space-between;
    background: var(--surface);
    padding: 18px;
    border-radius: 14px;
    margin-top: 12px;
}

.back {
    background: var(--surface);
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.details-poster {
    width: 100%;
    max-width: 260px;
    margin: auto;
}

.details-description {
    color: #bcbcc7;
    line-height: 1.6;
}

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

.secondary {
    padding: 15px;
    border-radius: 14px;
    background: var(--surface);
}

.empty {
    color: var(--muted);
    padding: 25px 0;
    grid-column: 1 / -1;
}


/* Метаданные фильмов */

.poster {
    position: relative;
}

.movie-rating {
    position: absolute;
    top: 9px;
    left: 9px;
    background: rgba(16, 16, 20, 0.88);
    color: #ffd166;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    z-index: 1;
}

.details-poster h3 {
    font-size: 24px;
    margin: 14px 0 6px;
}

.details-poster p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.movie p {
    line-height: 1.4;
}
