.header {
    height: 52px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    background: #ffffff;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
    z-index: 60;
    position: relative;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-left { flex: 1; }

.header-right {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.badge {
    padding: 8px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.badge span:first-child {
    font-size: 14px;
}

.badge #views {
    font-size: 14px;
    font-weight: 700;
}

.top-action {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    padding: 8px 13px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
}

.top-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.top-action:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.12);
}

.top-action .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.top-action .btn-icon svg {
    display: block;
}

#save {
    color: #fff;
    background: linear-gradient(180deg, #7c3aed 0%, #7043ec 100%);
    border-color: #7043ec;
}

#save:hover {
    background: linear-gradient(180deg, #8b5cf6 0%, #7043ec 100%);
    border-color: #6d28d9;
    filter: brightness(1.02);
}

#download {
    background: #ffffff;
}

@media (max-width: 700px) {
    .header {
        height: 56px;
        min-height: 56px;
        padding: 8px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .header-left {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        white-space: nowrap;
    }

    .header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        white-space: nowrap;
    }

    .brand-logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    .brand-logo img {
        width: 26px;
        height: 26px;
        display: block;
    }

    .brand-name {
        font-size: 15px;
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .badge {
        padding: 6px 8px;
        font-size: 12px;
        gap: 4px;
    }

    .badge #views {
        font-size: 12px;
    }

    .top-action {
        padding: 6px 8px;
        font-size: 12px;
        min-height: 34px;
    }

    #download span,
    #save span:last-child {
        display: none;
    }

    #download i,
    #save .btn-icon svg {
        width: 16px;
        height: 16px;
    }
}