/* === Б А Н Н Е Р === */

.poster-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 160px;
    border-radius: 16px;
    padding: 20px;
    gap: 8px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%);
    position: relative;
    overflow: hidden;
}

.poster-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(83, 52, 131, 0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.poster-box::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(15, 52, 96, 0.6) 0%, transparent 70%);
    border-radius: 50%;
}

.poster-box h1 {
    position: relative;
    z-index: 2;
    font-size: 22px;
    color: #fff;
}

.poster-box p {
    position: relative;
    z-index: 2;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.poster-box .stats-row {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stats-row .stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-row .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stats-row .stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* === П О И С К === */

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: var(--bg-secondary);
    height: 44px;
    padding: 0 14px;
    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box span {
    display: flex;
    align-items: center;
}

.search-box img {
    width: 18px;
    height: 18px;
    opacity: 0.5;
}

.search-box input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* === AUTOCOMPLETE DROPDOWN === */

.search-box {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.autocomplete-item .game-name {
    color: var(--text-primary);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.autocomplete-item .game-views {
    color: var(--text-secondary);
    font-size: 12px;
}

/* === К А Р Т О Ч К И === */

.list-cards-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
}

.list-cards-box h1 {
    padding: 0 2px;
}

.list-cards-box .card-list {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.list-cards-box .card-list::-webkit-scrollbar {
    display: none;
}

.card-list .card {
    display: flex;
    flex-direction: column;
    width: 140px;
    flex-shrink: 0;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:active {
    transform: scale(0.95);
}

.card:hover {
    transform: translateY(-2px);
}

.card .image-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card .image-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:active .image-box::after {
    opacity: 1;
}

.card-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
}

.rating-badge {
    top: 8px;
    left: 8px;
    background-color: rgba(255, 159, 10, 0.9);
    color: #000;
}

.accounts-badge {
    bottom: 8px;
    right: 8px;
    background-color: rgba(36, 129, 204, 0.9);
    color: #fff;
}

.card .main-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .main-poster {
    transform: scale(1.05);
}

.card .icons {
    width: 10px;
    height: 10px;
}

.card .card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 4px;
}

.card-info h2 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
    margin: 0;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-meta .price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.card-meta .views {
    font-size: 11px;
    color: var(--text-secondary);
}

/* === S E C T I O N   H E A D E R === */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.section-header h1 {
    font-size: 20px;
    font-weight: 700;
}

.section-header .see-all {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.section-header .see-all:active {
    background-color: var(--accent-dimmed);
}

/* === E M P T Y   S T A T E S === */

.empty-cards {
    display: flex;
    gap: 12px;
}

/* === S K E L E T O N   К А Р Т О Ч Е К === */

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-card {
    flex-shrink: 0;
    width: 130px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-poster {
    width: 130px;
    height: 195px;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        color-mix(in srgb, var(--bg-secondary), white 8%) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200px 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-text {
    height: 13px;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        color-mix(in srgb, var(--bg-secondary), white 8%) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200px 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-text.short {
    width: 60%;
}
